I want to give users the ability to view their blog posts in random order.
I can not implement it like this:
@posts = Post.paginate :page => params[:page], :order => 'RANDOM()'
since the parameter :orderis called with every request, and therefore I risk repeating blog entries.
What is the best way to do this?
source
share