How to pass additional get parameters using button_to?

A google search only turned up a few posts with the same problem, but
no answer…


<%= button_to(“New user”, new_user_path(:testvar1 =>
“test1”, :testvar2 => “test2”), :method => :get) %>


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?

Is this possible or are there another solution when using button_to?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs