How can I add span tags to the following link in ruby?
<%= link_t开发者_C百科o l(:label_demo), {:action => 'test', :class => 'link' %>
You can give the link_to
function a block as an argument where you can put whatever you want to sit between the <a>
and </a>
.
Check out this: http://api.rubyonrails.org/classes/ActionView/Helpers/TagHelper.html and this http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html for more information on the link_to
and tag
functions.
精彩评论