Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Log out all user with Devise

I'm using devise in my ruby-on-rails app. I have a User class and an AdminUser class using devise. In my admin panel I would like to logout all Users but not AdminUsers.

like image 559
MIkeO Avatar asked Nov 04 '11 20:11

MIkeO


1 Answers

The best way to do this is to use the scope-level sign out methods. So, if you want to sign out all users (User class), then you would do this.

sign_out :user
like image 58
munchbit Avatar answered Oct 16 '22 17:10

munchbit