0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【Rails】細かいあれこれ

Posted at

細かいあれこれ

1.リンク付きでFont-awesomeを実装したい!

html.erb
<%= link_to(content_tag(:i, '', class: 'Font-awesomeの名前'), 遷移先のパス名(もし引数を渡したかったらここにモデル名を入れる)) %>

Ex)
<%= link_to(content_tag(:i, '', class: 'fas fa-pen'), edit_list_path(list)) %>

content_tagはHTMLを生成するメソッド。

0
0
0

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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?