:page => :last
-
Eugene Pimenov
- Title changed from [PATCH] :page => :last to :page => :last
-
Chris Wanstrath
- Assigned user changed from Chris Wanstrath to Mislav
- State changed from new to open
-
Mislav
- State changed from open to invalid
Hi Eugene,
I don't like adding another option, it gets too cluttered. What I do is this:
User.paginate :page => params[:page], :order => 'updated_at DESC'By default it would paginate users from first to last, but now I'm paginating the other way -- from last updated to first. Pagination still starts from page 1 because that is the common pattern for pagination and I'm not going to break it.
Thanks for the suggestion.
-
Eugene Pimenov
I understand about order :), but it reverses all entries.
I just needed last page by default.
Thanks for review anyway. I'll still use my version in this project =)
Thanks for beautiful plugin.
BTW if you don't use :default_page => :last default will be 1 in the my patch. I needed last page in only one place.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
