Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module ApplicationHelper
- def bootstrap_icon_label(label, icon, white)
- white = ' icon-white' if white else ''
- "<i class=\"icon-#{icon}#{white}\"></i> #{label}".html_safe
- end
- end
- # Let's you do things like this:
- # <%= link_to bootstrap_icon_label('New Program', 'plus', true), new_program_path, class: "btn btn-primary" %>
- # To yield a bootstrap button with a little plus icon in it. YAY!
Add Comment
Please, Sign In to add comment