Skip to content

Instantly share code, notes, and snippets.

@trey
Created February 4, 2012 20:22
Show Gist options
  • Save trey/1739889 to your computer and use it in GitHub Desktop.
Save trey/1739889 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

@originated
Copy link

Thanks Andynu.

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