Skip to content

Instantly share code, notes, and snippets.

@patrickkeller
Forked from trey/gist:1739889
Created June 16, 2012 11:54
Show Gist options
  • Save patrickkeller/2941129 to your computer and use it in GitHub Desktop.
Save patrickkeller/2941129 to your computer and use it in GitHub Desktop.
Get Bootstrap's fancy Glyphicons working in Rails

Well, to get Bootstrap working, first install Less Rails Bootstrap.

Then create a button with a fancy icon like so:

<%= link_to raw('<i class="icon-trash icon-white"></i>'), card, confirm: 'Are you sure?', method: :delete, :class => 'btn btn-danger' %>

Note that you have to link to raw to get it to not escape the HTML.

Then you'll get something like this:

fancy delete button/icon

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