From: ga rg Date: 2007-12-21T14:16:18+09:00 Subject: Re: Random Positioning of Radio Form Items? Thank you :) I didn't know about .sort_by{ rand } ara.t.howard wrote: > On Dec 20, 2007, at 8:03 PM, ga rg wrote: > >> and then I want to have the multiple choice options in a random order. >> >> The obvious problem with this method is that the rand(num) ends up >> giving duplicate options. What elegant solution can you think for this >> problem? Basically, I just want to get random but unique numbers. >> >> Thank you for reading. > > <% @allanswers[@questionNum].sort_by{ rand }.each do > > ... > ... > > a @ http://codeforpeople.com/ -- Posted via http://www.ruby-forum.com/.