I wanted to design it a little fashionably, so I tried using the icon. Font Awesome There are many icons that you can use for free. It can also be used with Rails.
Gemfile
gem 'font-awesome-rails'
Add to the bottom of the file.
At the terminal
bundle install
ruby:app/views/layouts/application.html.erb
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.9.0/css/all.css">
Describe in the <head> tag
.
Select the icon you want to use from Official Site and select it.
<i class="fa fa-Icon name"></i>
It can also be used with helper methods.
Recommended Posts