準備
Gemfileに
gem 'font-awesome-rails'
を記載。
ターミナルでbundle install
を実行。
ターミナル
bundle install
application.css
に*= require font-awesome
を記載。
app/assets/stylesheets/application.css
/*
(省略)
*= require font-awesome
(省略)
*/
使い方
<i class="fa fa-home"></i>
ヘルパーメソッドを使用できるので
<%= fa_icon("home") %>
と書くこともできる。
例えば
<%= fa_icon("home 5x") %>
で5倍。