Reputation: 1
I'm trying to implement some link_to's using post method.
However, it always puts all the information as a query string in the browser's bar (it behaves as a GET).
Why?
Here is my code:
<%= link_to hotel[:name], {:controller => "gds_hotels", :action => "hotel_details",
:dest => @destination,
:ci => @check_in,
:co => @check_out,
:hotel => hotel,
:rooms => hotel[:rooms]}, :method => "POST" %>
Thank you! =)
Upvotes: 0
Views: 1252
Reputation: 841
You should use button_to
http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-button_to
Upvotes: 2