如何在var中保存选定的选项

时间:2018-02-07 00:40:10

标签: ruby-on-rails select

我需要在var中保存选定的选项。我怎么能这样做?

<%= f.collection_select(:department_id , Department.all, :id, :name, options ={:prompt => "-Select department"}) %>

0 个答案:

没有答案