June 9, 2008

Rails - get random rows without using ORDER BY RAND()

Thing.find :first, :offset => rand(Thing.count)