# postgesql
User.limit(5).order("RANDOM()")
# mysql
User.limit(5).order("RAND()")
https://hashrocket.com/blog/posts/rails-quick-tips-random-records
# postgesql
User.limit(5).order("RANDOM()")
# mysql
User.limit(5).order("RAND()")
https://hashrocket.com/blog/posts/rails-quick-tips-random-records