<commit_before># Font Awesome + Less + Rails 3.2+ Asset Pipeline

With LESS and fonts from [Font Awesome](http://fortawesome.github.com/Font-Awesome),
*less-rails-fontawesome* is a gem to integrate Font Awesome to your Rails 3.2+ application.


## Installation

Add the gem to your *assets* group in the *Gemfile*:

    gem 'less-rails-fontawesome', :group => :assets

Then in your *app/assets/stylesheets/application.css.less*:

    @import 'fontawesome';

You can also use it with the [less-rails-bootstrap](https://github.com/metaskills/less-rails-bootstrap) gem.
Just import *fontawesome* right after *twitter/bootstrap*:

    @import 'twitter/bootstrap';
    @import 'fontawesome';


## Helper methods

To place Font Awesome icon add to *i* element and set *class*
attribute to an icon name, for example:

    <i class="icon-trash"></i>

To ease placing Font Awesome icons, I defined a few helper methods:
[application_helper.rb]()



##


## License

The font and LESS from [Font Awesome](http://fortawesome.github.com/Font-Awesome) are under CC-BY-3.0.<commit_msg>updated README with info about helpers<commit_after># Font Awesome + Less + Rails 3.2+ Asset Pipeline

With LESS and fonts from [Font Awesome](http://fortawesome.github.com/Font-Awesome),
*less-rails-fontawesome* is a gem to integrate Font Awesome to your Rails 3.2+ application.


## Installation

Add the gem to your *assets* group in the *Gemfile*:

    gem 'less-rails-fontawesome', :group => :assets

Then in your *app/assets/stylesheets/application.css.less*:

    @import 'fontawesome';

You can also use it with the [less-rails-bootstrap](https://github.com/metaskills/less-rails-bootstrap) gem.
Just import *fontawesome* right after *twitter/bootstrap*:

    @import 'twitter/bootstrap';
    @import 'fontawesome';


## Helper methods

To place Font Awesome icon add to *i* element and set *class*
attribute to an icon name, for example:

    <i class="icon-trash"></i>

To ease placing Font Awesome icons, I defined in
[application_helper.rb](https://github.com/wbzyl/less-rails-fontawesome/blob/master/application_helper.rb))
a few helper methods.
For example, to place *icon-upload-alt* icon next to *Edit* button write:

    <%= ilink_to "upload-alt Edit", edit_post_path(post), class: 'btn btn-mini' %>

to place *icon-trash* next to *Destroy* button write:

    <%= ilink_to 'trash Destroy', post, confirm: 'Are you sure?', method: :delete, class: 'btn btn-mini btn-danger'%>

The idea is to prefix the link text with the icon name stripped off *icon-* prefix.


## License

The font and LESS from [Font Awesome](http://fortawesome.github.com/Font-Awesome) are under CC-BY-3.0.
{'fraction_non_alphanumeric': 0.12129177619226436, 'fraction_numerical': 0.004506196019526849, 'mean_word_length': 4.296222664015905, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3034843', 'n_tokens_mistral': 885, 'n_tokens_neox': 818, 'n_words': 291}