나는 발표자에이 조각을 가지고 :content_tag 생성 이상한 HTML
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?
맞습니다! 감사 –