This one is short but not something I immediately thought of. It doesn’t rely on an ActiveRecord abstraction, but I originally thought it would need to, so the title is to save future Web searchers.
The idea is that you want to create a list of all the Users, but ordered randomly. It turns out that it’s just this (Postgre)SQL:
SELECT * FROM users ORDER BY random();
So, in Rails:
User.find(:all, :order => 'random()')