I want to get a set of records in random order. Will Car.order('newid()') work? Is there a better way to do this? Rails 3.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| choose 6 records from the database randomly | 5 | 175 | November 3, 2025 | |
| :order question | 1 | 109 | August 16, 2007 | |
| :order_by => ["RAND()"] | 7 | 215 | October 26, 2025 | |
| choose 6 records from the database randomly | 2 | 141 | October 26, 2025 | |
| The most performed way to get random records! | 0 | 564 | July 14, 2023 |