generating random odd integer

hi
how can i generate random odd integers?
i want it to refer to user.id
thanks

Something like: 2 * rand(6) + 1 ? The example will give you an odd number between 1 and 11 (both included). Adapt the number in rand as needed.

More details here http://ruby-doc.org/core/classes/Kernel.html#M005974

As a side note: Google is your friend.

Felix