Created
March 9, 2012 09:53
-
-
Save pubis/2005891 to your computer and use it in GitHub Desktop.
Simple helper for Twitter Bootstrap stuff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module BootstrapHelper | |
def icon_tag icon, opts = {} | |
defaults = { | |
white: false, | |
large: false | |
} | |
defaults.merge(opts) | |
class_string = "icon-#{icon.to_s}" | |
class_string = "#{class_string} icon-white" if defaults[:white] | |
class_string = "#{class_string} icon-large" if defaults[:large] | |
content_tag(:i, '', class: class_string) | |
end | |
def caret_tag | |
content_tag(:b, '', class: 'caret') | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment