Skip to content

Instantly share code, notes, and snippets.

@thomascarterx
Created February 19, 2016 18:15
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 thomascarterx/07d613fea46d0d855f1c to your computer and use it in GitHub Desktop.
Save thomascarterx/07d613fea46d0d855f1c to your computer and use it in GitHub Desktop.
helpfixfarails
This is what I need to be rendered
<li>
<a href="#"><i class="fa fa-magic"></i> Link</a>
</li>
I'm using the <a href="https://github.com/bokmann/font-awesome-rails">font-awesome-rails</a> gem
Here is the helper section from the README, note there isn't a mention of how to use it with a link_to which is what I need.
fa_icon "camera-retro"
# => <i class="fa fa-camera-retro"></i>
fa_icon "camera-retro", text: "Take a photo"
# => <i class="fa fa-camera-retro"></i> Take a photo
fa_icon "chevron-right", text: "Get started", right: true
# => Get started <i class="fa fa-chevron-right"></i>
fa_icon "quote-left 4x", class: "text-muted pull-left"
# => <i class="fa fa-quote-left fa-4x text-muted pull-left"></i>
content_tag(:li, fa_icon("check li", text: "Bulleted list item"))
# => <li><i class="fa fa-check fa-li"></i> Bulleted list item</li>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment