will_paginate edit first page

36 views
Skip to first unread message

Melb01

unread,
Aug 8, 2014, 6:17:16 AM8/8/14
to rubyonra...@googlegroups.com
Hi,
I am using will_paginate gem to paginate some results and it works very well
but I want to be able to edit the first page and palce some html fragments not included in the results on top or on the side
how can I do this to have the fragment only in the first page


regards

Walter Lee Davis

unread,
Aug 8, 2014, 5:21:24 PM8/8/14
to rubyonra...@googlegroups.com
You could use the params[:page] attribute to switch this off and on, I guess. If params[:page] is missing or equal to 1, then do this, else do that.

Walter
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/6c20e6ee-7957-4ac6-b3d2-36471426c690%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Evgeniy Shurmin

unread,
Aug 9, 2014, 4:33:10 AM8/9/14
to rubyonra...@googlegroups.com
Could you look at kaminari gem. It is more flexible and allows you change everything.

Melb01

unread,
Aug 15, 2014, 3:42:17 AM8/15/14
to rubyonra...@googlegroups.com
Thank you, I used this params, Ithoughts Ican do it with some options in the gem

regards

Maggie Davis

unread,
Aug 15, 2014, 5:31:17 AM8/15/14
to rubyonra...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages