Hi
I have the following pagination search query
@user_pages, @users = paginate :users, :per_page => 2,
:conditions => "name LIKE
''#{params[''search''][''name'']}%''"
When ever I click on page 2 the
params[''search''][''name''] is no longer
available, how can I pass this overto the next page?
Cheers
jon
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
manohar amrutkar wrote:> Hi Jon, > > I am in trouble with the same problem. > > Please have look on this problem which i have posted on this group. > > If you have got the solution please tell me. > > Regards, > Manohar.Hey, I got around this by writing the params to a session and then using that in my query -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
that is exactly what i did as well. Scott Holland wrote:> manohar amrutkar wrote: >> Hi Jon, >> >> I am in trouble with the same problem. >> >> Please have look on this problem which i have posted on this group. >> >> If you have got the solution please tell me. >> >> Regards, >> Manohar. > > > Hey, > > I got around this by writing the params to a session and then using that > in my query-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks. I did the same and its working On Feb 7, 6:21 pm, Scott Holland <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> manoharamrutkar wrote: > > Hi Jon, > > > I am in trouble with the same problem. > > > Please have look on this problem which i have posted on this group. > > > If you have got the solution please tell me. > > > Regards, > >Manohar. > > Hey, > > I got around this by writing the params to a session and then using that > in my query > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hello, you can try also overwrite parameter :page, like this:
Link to the first page:
link_to image_tag("/images/first_page.gif", :border => 0, :title
=>
"Navigate to the first page"), {:overwrite_params => {:page =>
@pages.first}} if (@pages.current.number != 1)
Previous page:
link_to image_tag("/images/previous_page.gif", :border => 0, :title
=>
"Navigate to the previous page"), {:overwrite_params => {:page
=>
@pages.current.previous}} if @pages.current.previous
Pages with number:
pagination_links(@pages, {:window_size =>
@window_size, :always_show_anchors => false, :params => @params})
Next page:
link_to image_tag("/images/next_page.gif", :border => 0, :title
=>
"Navigate to the next page"), {:overwrite_params => {:page =>
@pages.current.next}} if @pages.current.next
Last Page:
link_to image_tag("/images/last_page.gif", :border => 0, :title
=>
"Navigate to the last page"), {:overwrite_params => {:page =>
@pages.last}} if (@pages.current.number != @pages.last.number)
Best Regards, Sergey.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---