我正在尝试做这样的事情.
select :model, :attribute, :style => "some:style;"
Run Code Online (Sandbox Code Playgroud)
添加style到select helper导轨中,但它无法正常工作.
Jim*_*dra 21
从文件:
select(object, method, choices, options = {}, html_options = {})
所以你的:style哈希需要成为第五个参数.例如:
select(:model, :attribute, @options_for_select, { }, { :style => 'some: style' }
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
16000 次 |
| 最近记录: |