User.find(:all, :order => "RANDOM()", :limit => 10)
was the way I did it in Rails 3.
User.all(:order => "RANDOM()", :limit => 10)
is how I thought Rails 4 would do it, but this is still giving me a Deprecation warning:
DEPRECATION WARNING: Relation#all is deprecated. If you want to eager-load a relation, you can call #load (e.g. `Post.where(published: true).load`). If you want to get an array of records from a relation, you can call #to_a (e.g. `Post.where(published: true).to_a`).