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 3 years have passed since last update.

ページを戻すとき

Posted at

こんな発見が!

些細な発見ですが、link_toメソッドでリンク先を**:back** に指定してあげると「ページに戻る」ことができます。
例として、railsの編集機能で編集せずに戻りたい時に使えます!

edit.html.erb
<%= link_to "ページに戻る", :back, class: 'btn'%>
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?