The method: get
attribute should be defined on the form and not on the input tag.
Use GET with date_select
-
29-06-2022 - |
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?
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow