Skip to content

Add icon helper method

Ramya Authappan requested to merge github/fork/rspeicher/rs-fa-icon-helper into master

Created by: rspeicher

This adds an icon helper method to the IconsHelper module (and also moves the spinner helper method there to make ApplicationHelper less of a junk drawer). Right now this method simply delegates to fa_icon built into the font-awesome-rails gem. It handles creating the i element and adds the necessary classes.

This cleans up some minor pieces of code. If this PR gets accepted I've got another one that updates all of the HAML views to use this as well (e.g., %i.fa.fa-code-fork becomes = icon('code-fork')), but I didn't include it in this one because its touches dozens of files and I want to minimize the merge conflicts.

Merge request reports

Loading