对于form_tag而不是form_for,date_select的等价物是什么?

Lea*_*RoR 3 ruby-on-rails ruby-on-rails-3

我不能在form_for中使用f变量,所以我需要一个form_tag的date_select.你会如何将其转换为在form_tag上使用?

的form_for

<%= f.date_select :all_dates, :start_year => 2010, :end_year => 2012, :order => [:month, :day, :year], :use_short_month => true  %>
Run Code Online (Sandbox Code Playgroud)

的form_tag

user_price = model

<%= date_select("user_price" , "all_dates", :start_year => 2010, :end_year => 2012, :order => [:month, :day, :year], :use_short_month => true  %>
Run Code Online (Sandbox Code Playgroud)

use*_*254 5

你可以只使用date_select没有f,如果我理解正确的,但是你可以显示完整的表单代码?