rails/rails — pull request #7001 by mkraft (2012-07-07 15:28:47+00:00)
Title: Added a method for retrieving a random record.

Often it's useful to retrieve a random record. This provides
an alternative to the often used .first or .last when a random record
is actually what is intended.

Post.random
# => Returns a random Post record or nil