Answer the question
In order to leave comments, you need to log in
How to override the delete session method in Devise?
In the file sessions_controller.rb I tried to perform various manipulations with:
def destroy
super
end
devise/sessions#destroy
Answer the question
In order to leave comments, you need to log in
To override the default Devise gem methods, you need the following:
# app/controllers/sessions_controller.rb
class SessionsController < Devise::SessionsController
def destroy
# your code here
end
end
# app/config/routes.rb
devise_for :users, controllers: {sessions: 'sessions'}
# /app/assets/javascripts/application.js
//= require turbolinks
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question