Skip to content

Instantly share code, notes, and snippets.

@edymerchk
Last active December 27, 2015 12:59
Show Gist options
  • Save edymerchk/7330018 to your computer and use it in GitHub Desktop.
Save edymerchk/7330018 to your computer and use it in GitHub Desktop.
Bootstrap 2
def glyph(*names)
content_tag :i, nil, :class => names.map{|name| "icon-#{name.to_s.gsub('_','-')}" }
end
link_to glyph(:eye_open, :white), content
Bootstrap 3
def glyph(*names)
content_tag :span, nil, :class => names.map{|name| "glyphicon #{name.to_s.gsub('_','-')}" }
end
link_to glyph(:glyphicon_off) + "Logout", destroy_user_session_path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment