swe*_*let 0 ruby-on-rails ruby-on-rails-4
如何将多个类添加到 Rails 内容标签?
我试过了
content_tag(:span, 'some text', class: ('foo', 'bar'))
content_tag(:span, 'some text', class: cssClass, class: 'test')
Run Code Online (Sandbox Code Playgroud)
一类工作得很好:
content_tag(:span, 'some text', class: 'foo')
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
818 次 |
| 最近记录: |