Ruby on rails 在哪里插入类?
我是rails新手,对于选择选项的Ruby on rails 在哪里插入类?,ruby-on-rails,ruby,Ruby On Rails,Ruby,我是rails新手,对于选择选项的类:'custom-select'应该放在哪里,我感到非常困惑 <%= form.select(:category_id, options_for_select(@categories)) %> 它去哪里了 提前感谢您。HTML哈希是select tag helper方法中的第四个参数 <%= form.select(:category_id, options_for_select(@categories), {}, class: 'cu
类:'custom-select'
应该放在哪里,我感到非常困惑
<%= form.select(:category_id, options_for_select(@categories)) %>
它去哪里了
提前感谢您。HTML哈希是select tag helper方法中的第四个参数
<%= form.select(:category_id, options_for_select(@categories), {}, class: 'custom-select') %>
HTML哈希是select tag helper方法中的第四个参数
<%= form.select(:category_id, options_for_select(@categories), {}, class: 'custom-select') %>
NP-参数如下:select(object,method,choices=nil,options={},html\u options={},&block)
NP-参数如下:select(object,method,choices=nil,options={},html\u options={},&block)
这个问题已经存在。这个问题已经存在。