Domanda

I use date_select to create a dropdown menu with Rails 4.

date_select('range', 'start_date', { :order => [:day, :month, :year], :start_year => 2008, :end_year => Date.current.year, :use_month_numbers => true, :default => session[:start_date]}, {:method => :get, :onchange => "document.dsform.submit()"})

However, the data is sent with a POST request instead of GET. What is going wrong here?

È stato utile?

Soluzione

The method: get attribute should be defined on the form and not on the input tag.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top