0

我使用 date_select 创建一个带有 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()"})

但是,数据是通过 POST 请求而不是 GET 发送的。这里出了什么问题?

4

1 回答 1

0

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

于 2013-09-23T08:26:06.787 回答