I am using a slim template file for a Rails form. I’d like to use a Foundation icon-font as the graphic in the link, but cannot seem to find a way to include the font in the link_to. Here is the code in question.
h3 Categories
table
tr
th <span class="secondary radius label">Category Name</span>
th colspan="2" <span class="secondary radius label">Actions</span>
- for category in @categories do
tr
td #{category.name}
td #{link_to 'Edit', edit_category_path(category)} <i class="general foundicon-edit">
In the last line, I can get the icon to display next to the link (as shown), but I can’t see how to embed it in the link title itself (currently set to ‘Edit’).
Any help greatly appreciated!
fyi:: Rails 3.2.11, Ruby 1.9.3, Foundation 3
Not tested, but this should get you close:
This might work too: