【发布时间】:2014-10-13 19:30:28
【问题描述】:
我在演示者中有这个 sn-p:
html << helpers.content_tag(:li, class: 'dropdown-header') do
helpers.content_tag('span', "Status: #{online_srt}", class: 'glyphicon glyphicon-off')
end
生成的html是这样的
<li class="dropdown-header">
<span class="glyphicon glyphicon-off">::before Status: Online</span>
</li>
这使得输出看起来很奇怪
“在线”字符串在“状态”之后有很多空格,这是没有意义的。我认为 ::before 是对此负责的人......我该怎么做才能在没有这个 ::before 的情况下打印输出?
【问题讨论】:
标签: ruby-on-rails ruby-on-rails-3 twitter-bootstrap