I have this syntax that works (since it is from the API, pretty much)
<% form_tag :action => "whatever" do -%> <div><%= submit_tag 'Save' %></div> <% end -%>
and this that works
<%= form_tag({:action => "whatever"}, {:method => "get"})%>
Now I tried to combine them, guessing the syntax. "Get" is not added as a form method, as I hoped. How to read it?
<% form_tag :action => "whatever",:method => "get" do -%> <div><%= submit_tag 'Save' %></div> <% end -%>
The form tag should read:
<form action="hello/whatever" method="get"/>
not
<form action="hello/whatever?method=get" />
source share