Get a random record in Ruby on Rails – MySQL Posted on 17 October 2007 by admin Reply To get a random record from MySQL in Ruby on Rails use: User.find(:all, :order => 'rand()')