Skip to content

Instantly share code, notes, and snippets.

@ndizazzo
Last active December 17, 2015 10:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ndizazzo/5593126 to your computer and use it in GitHub Desktop.
Save ndizazzo/5593126 to your computer and use it in GitHub Desktop.
Rails helper code that generates a bootstrap font icon, which links to the provided path.
@ndizazzo
Copy link
Author

Place the code listed above in your application_helper.rb, then you can use the following call in your views:

<%= button_link "icon-trash", event_path(e) %>

or

<%= button_link "icon-trash", event_path(e), :delete, false, ["btn-danger", "btn-mini"] %>

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