Forum: Ruby on Rails link_to query string

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
matthew clark (Guest)
on 2006-01-22 06:52
(Received via mailing list)
Here's a simple one I think.

Using link_to,  how do you get multiple fields in the query string?

link_to("anchor text", {:action=>"neat_page", :field_1=>"value 1",
:field_2=>"value 2"})
-this only gets you field_1 in the query string

as does this -
link_to("anchor text", :action=>"neat_page", :field_1=>"value 1",
:field_2=>"value 2")

link_to("anchor text", :options=>{:action=>"neat_page", :field_1=>"value
:field_2=>"value 2"})
- this gets you a querystring of

This topic is locked and can not be replied to.