Reputation: 1177
how can I add the following html into my link_to
<i class="icon-plus icon-white"></i>
<%= link_to 'add', '#', :class => 'btn btn-mini pull-right'%></th>
so that the html that will be produced will look like this
<a class="btn btn-mini pull-right" href="#">
<i class="icon-plus icon-white"></i>
</a>
Upvotes: 0
Views: 107
Reputation:
Check out the documentation for more info, but you have two main options. I prefer the second option, but it's up to you!
Inline it.
<%= link_to '<i class="icon-plus icon-white"></i>', '#', :class => 'btn btn-mini pull-right'%>
Put it in a block.
<%= link_to(@user) do %>
<i class="icon-plus icon-white"></i>
<% end %>
Upvotes: 0
Reputation: 16064
Check out the answer to this question, where I answer pretty much this exact same thing.
Upvotes: 1