A google search only turned up a few posts with the same problem, but
no answer...
Problem:
<%= button_to("New user", new_user_path(:testvar1 =>
"test1", :testvar2 => "test2"), :method => :get) %>
generates:
<form method="get" action="/users/new?
testvar1=test1&testvar2=test2" class="button-to"><div><input
type="submit" value="New user" /></div></form>
Which doesn't work as browsers strip the get parameters off the uri.
Shouldn't the button_to-helper generate the get parameters as hidden
tags when using :method => :get?
Like this?
<form method="get" action="/users/new" class="button-to"><div><input
type="submit" value="New user" /></div><input type="hidden"
name="testvar1" value="test1"><input type="hidden" name="testvar2"
value="test2"></form>
Is this possible or are there another solution when using button_to?
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---