Skip to content

Instantly share code, notes, and snippets.

@reggieb
Created February 10, 2017 12:27
Show Gist options
  • Save reggieb/99a2ad17643e101786fc6bf46285139a to your computer and use it in GitHub Desktop.
Save reggieb/99a2ad17643e101786fc6bf46285139a to your computer and use it in GitHub Desktop.
def glyphicon(name)
content_tag(
'span', '', class: "glyphicon glyphicon-#{name}", 'aria-hidden' => 'true'
)
end
@reggieb
Copy link
Author

reggieb commented Feb 10, 2017

Add a bootstrap compatible glyphicon to the page:

<%= glyphicon :ok %> <%= glyphicon 'start-empty' %>

Note, that you can use symbols or strings for single word glyphicon names, but symbols won't work for multi-word names because of the hyphens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment