I am currently looking for a software/web development job preferably as a Rails-based developer.
Please email me at email@example.com. Thanks in advance for any leads!
Getting Random Records In Rails
Posted by Weston Ganger
Need to get a random record? Fortunately databases have built-in functions for this.
# For PostgreSQL and SQLite Model.order("RANDOM()").first # For MySQL Model.order("RAND()").first
Related External Links: