pagination not working when using edge rails
-
Chris Wanstrath
- State changed from new to open
Try passing in the :page.
@news = News.paginate(:per_page => 2, :include => :user, :order => 'news.created_at DESC', :page => params[:page]) -
Chris Wanstrath
- State changed from open to invalid
-
Mislav
Scot: as Chris said, you have to pass the page parameter explicitly. This is because the model can't access controller params. If it could, the page parameter would be optional.
The :page=>params[:page] repetition bugs me, too. I would like to avoid it somehow, but still stay clean with MVC.
-
scot
Thanks,
all working now.
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.