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?