1
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.

Rails gem 'devise'でログアウトをコントローラから一発で呼ぶ方法

Posted at

#Rails gem 'devise'でログアウトをコントローラから一発で呼ぶ方法
今日はrailsのコントローラで一発でログアウトさせるということで記事をかいきます!

結論としては
reset_session
これをコントローラーないに記述するだけでした笑

今回なぜこれを使ったのかと言いますと
現在ユーザ退会機能を作っておりまして、その退会処理の後にログアウトさせる
必要があったために使いました:relaxed:

これ便利なメソッドなので是非皆さんも使ってみてくださいね!!

1
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
1
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?