Last active
January 1, 2016 10:19
-
-
Save guinslym/8131082 to your computer and use it in GitHub Desktop.
I want to add inside of link_to an Icon-tag I have some difficulties with adding it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="path..."> | |
<i class="icon-home" icon-large="2x"></i> | |
Home | |
</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- This is works but I want to add the Icon tags--> | |
<ul> | |
<% Page.all.each do |i| %> | |
<li><%= link_to i.name, i %></li> | |
<% end %> | |
</ul> | |
<!-- | |
/////////////////// | |
////////// | |
I get rid of the multiple error but not the same output | |
<ul> | |
<% Page.all.each do |i| %> | |
<li><%= | |
link_to("#", class: "") do | |
(i.name + content_tag(:i, "", class: "i.icon_type")).html_safe | |
end | |
%></li> | |
<% end %> | |
</ul> | |
this output : + Home<i class="i.icon_type"></i> | |
+ Services<i class="i.icon_type"></i> | |
--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment