1

Is there a way to sign-out devise user using local rails c ? I was trying to use user.update_attributes(unique_session_id: "") or rake db:sessions:clear but without success

mr_muscle
  • 2,536
  • 18
  • 61
  • This may be helpful https://stackoverflow.com/questions/28935054/how-can-i-sign-out-a-devise-user-from-the-rails-console – Tomer Shemesh May 21 '21 at 12:46
  • @TomerShemesh I saw this and none of this method works. For sign_out user` I'm getting `NoMethodError (undefined method sign_out' for main:Object)` – mr_muscle May 21 '21 at 12:55
  • I miss post the answer in wrong place. So check it, sorry for me: https://stackoverflow.com/a/67639213/2311619 – protoproto May 21 '21 at 22:35
  • are you storing user session in cookies or server-side? – beniutek May 22 '21 at 17:11

0 Answers0