bokmann/font-awesome-rails — pull request #30 by rmm5t (2013-08-04 21:51:36+00:00)
Title: Consider adding some icon helpers

This is something I've been considering for a while. I've been copying some font-awesome view helpers between some rails projects, but it'd be nice to have them consolidated. I've also been on a kick to consolidate the [competing](https://github.com/littlebtc/font-awesome-sass-rails) [font-awesome asset](https://github.com/balexand/font_awesome) [pipeline gems](https://github.com/kristianmandrup/font_awesome-sass-rails) and try to make this gem the canonical one (several others are outdated, rely on sass unnecessarily, etc). [One of the competing gems](https://github.com/kristianmandrup/font_awesome-sass-rails) had some helpers, which rekindled the idea.

In trying to formalize this proposal, I was thinking of two new helper methods, `fa_icon` and `fa_stacked_icon`. Before I dive into an implementation, I wanted to present some method signature examples and start a discussion.

```ruby
#
fa_icon "camera-retro"

# Take a photo
fa_icon "camera-retro", text: "Take a photo"

#
fa_icon "camera-retro large"
#
fa_icon "camera-retro 2x"
#
fa_icon "camera-retro 3x"
#
fa_icon ["camera-retro", "4x"]

#
fa_icon "quote-left 4x muted", class: "pull-left"
#
fa_icon "flag 4x border", class: "pull-left"

#
fa_icon "refresh spin"
fa_icon ["refresh", "spin"]

#
fa_icon "spinner spin large"

#
fa_icon "pencil fixed-width"

#
Bulleted list item

content_tag(:li, fa_icon("ok li", text: "Bulleted list item"))

#
fa_icon "shield rotate-180"
#
fa_icon "shield flip-vertical"

#
#
#
#
fa_stacked_icon "check-empty", "twitter"

#
#
#
#
fa_stacked_icon "sign-blank", "terminal light"
```