Skip to content

Instantly share code, notes, and snippets.

@meleyal
Created March 10, 2011 12:00
Show Gist options
  • Save meleyal/863998 to your computer and use it in GitHub Desktop.
Save meleyal/863998 to your computer and use it in GitHub Desktop.
active record recipes
# random records
scope :random, limit(5).order("RANDOM()")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment