I am trying to Submit a form using get method. Earlier I was trying a similar thing with form_tag and it was working but now when I changed to a form_for tag, this doesn\'t
You can pass the raw HTML attributes using :html
if you need to. For Rails 3:
<%= form_for(@post_filter, :url=> filter_path, :html => { :method => 'GET' }) do |f| %>
Update and in Rails 4, per @andre.orvalho's suggestion below, the method
parameter can be supplied directly:
<%= form_for(@post_filter, url: filter_path, method: :get ) do |f| %>