我有一个像这样的表格:
<%= form_for People::Selector::GenderReportForm.new, url: selector_download_path do |f| %>
<%= f.text_field :name %>
<%= select_month(Date.today,
{field_name: 'start_month',
prefix: "people_selector_gender_report_form"},
{class: "form-control"}) %>
<% end %>
从我的角度来看,prefix: "people_selector_gender_report_form"
也应该能够从资源中获取:People::Selector::GenderReportForm.new
有没有办法在没有prefix
的情况下构建相同的表单?
或者像prefix: f.prefix
这样的东西可能吗?感谢