What\'s the best way to use an icon provided by Twitter Bootstrap as a link in Rails 3?
Currently, I am using it like the pasted snippet, but the icon doesn\'t displ
I should create this helper:
module BootstrapHelper def icon(*names) content_tag(:i, nil, :class => icon_classes(names)) end private def icon_classes(*names) names.map{ |name| "icon-#{name}" } end end
And use like this:
link_to icon(:trash, :white), user_path(@user), method: :delete