LoginSignup
5

More than 5 years have passed since last update.

link_toでfont-awesomeを使う方法

Posted at

link_toでfont-awesomeを使う方法

例えばこの場合

修正前.html.erb
<%= link_to new_customer_path(@loginUser), class:"btn btn-primary" %>
修正後.html.erb
<%= link_to new_customer_path(@loginUser), class:"btn btn-primary" do %>
  <i class="fa fa-user-plus"> アカウント登録</i>
<% end %>

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5