Ruby-on-rails: link-to using post method but parameters are in the url?

A link_to will always put the arguments into the query string as it is creating a get-style html link - even if you put :method => :post that just appends an extra ("special") argument "_method.

A link_to will always put the arguments into the query string as it is creating a get-style html link - even if you put :method => :post that just appends an extra ("special") argument "_method". What I think you really want is a button_to link - which will make it into a sort of form-post. It works the same but says "button_to" instead.

The downside is that it will look like a button. But you can give it a css class (eg "unbutton") then change the styling on that css class to make it not look like a button. Alternatively - if what you really want is actually to have no parameters passed at all... then just don't include them when making your link (eg link_to "My link" path - there's no need for :post if you don't want to post any params).

Finally - if what you want is for the params to become a part of the URL (eg stuff/param_1/more_stuff/param_2 etc) then you need to update your routes to include the parameters as options. Have a look at the routing section of the rdoc (link below) for how to do that: api.rubyonrails.org/classes/ActionContro....

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions