Skip to content

Instantly share code, notes, and snippets.

@jnf
Last active December 21, 2015 18:29
Show Gist options
  • Save jnf/6347435 to your computer and use it in GitHub Desktop.
Save jnf/6347435 to your computer and use it in GitHub Desktop.
Strange middleman rendering.
helpers do
def icon_tag(icon, copy)
tag(:i, class: icon) + ' ' + copy
end
end
<ul>
<li><%= tag(:i, class: 'icon-plus-sign') %></li>
<li><%= tag(:i, class: 'icon-bar-chart') %></li>
<li><%= tag(:i, class: 'icon-file') %></li>
</ul>
<ul>
<li>
<i class="icon-plus-sign"></i>
</li>
<i class="icon-plus-sign">
<li>
<i class="icon-bar-chart"></i>
</li>
<i class="icon-bar-chart">
<li>
<i class="icon-file"></i>
</li>
<i class="icon-file"></i></i></i>
</ul>
ul
li= icon_tag 'icon-plus-sign', 'Calculator'
li= icon_tag 'icon-bar-chart', 'Formulas'
li= icon_tag 'icon-file', 'Math words'
<ul>
<li><i class="icon-plus-sign"> Calculator</i></li>
<li><i class="icon-plus-sign"><i class="icon-bar-chart"> Formulas</i></i></li>
<li><i class="icon-plus-sign"><i class="icon-bar-chart"><i class="icon-file"> Math words</i></i></i></li>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment