Hi, I am a newbie in ROR.
I have a controller in module - Admin::ProductController, and I am 
paginating my search result (I read 
http://wiki.rubyonrails.org/rails/pages/HowtoPagination).
However, the link generated by:
<%= link_to(''next page'', {:params =>
params.merge(''page'' =>
@item_pages.current.next)}) if @item_pages.current.next %>
is a relative path, making the full URL something like:
http://localhost:3000/admin/admin/product/list?query=book&page=2
                      ^^^^^^^^^^^
Any advice for me? Thanks a lot!
-- 
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
-~----------~----~----~----~------~----~------~--~---
...somewhere a ''/'' is needed - that''s why the admin is printed twice => when you are on a page http://www.domain.com/admin and use the link, it adds the relative link to the existing /admin(creating a bad /admin/admin). but if there were a ''/'' in the begining of the relative link you create, it would start it from the end of the domain, and then you would get /admin/... in the correct way. i think. hope it helps, harp -- 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 -~----------~----~----~----~------~----~------~--~---
I understand your point. Thanks! But it is a bad idea to modify params[:controller], isn''t it? Are there any alternatives? -- 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 -~----------~----~----~----~------~----~------~--~---