AFAIK, this is a serious shortcoming of link_to. You need to add them
manually to the string. Google for some helpers to do this for you.
On May 28, 7:45 pm, Chad
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:> I''ve read quite a few examples of how to do this,
likehttp://railsenvy.com/2007/2/18/merging-paramsand it works fine so long
> as I use string variables in my link do you have any clue how to keep a
> hash in the link?
>
> Example.
>
> My search form has several search options, sort by''s, checkboxes,
etc.
> Using a get request does something like,
> /search?q=foo&option[sort]=price&option[perpage]=10 .... etc.
>
> However, if I try to put the params back into a link it get stringified
> and ends up: /search?q=foo&options=sortpriceperpage10&page=2
>
> Trying to wrap my head around this one, any clues would be much
> appreciated :)
>
> --
> 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
-~----------~----~----~----~------~----~------~--~---