It looks like the OP also asked here: http://railsforum.com/viewtopic.php?id=33793 and got much better answers.
To adapt the best solution out there, here's what I like:
(in view)
<%= select_tag :per_page, options_for_select([10,20,50], params[:per_page].to_i), :onchange => "if(this.value){window.location='?per_page='+this.value;}" %>
(in the controller)
@per_page = params[:per_page] || Post.per_page || 20 @posts = Post.paginate( :per_page => @per_page, :page => params[:page])
source share