Last active
May 2, 2022 20:34
-
-
Save KonnorRogers/8f93a71d3498265cb84ce2d665b9955a to your computer and use it in GitHub Desktop.
Override devise
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
class Users::SessionsController < Devise::SessionsController | |
# before_action :configure_sign_in_params, only: [:create] | |
# GET /resource/sign_in | |
# def new | |
# super | |
# end | |
# POST /resource/sign_in | |
# def create | |
# super | |
# end | |
# DELETE /resource/sign_out | |
# def destroy | |
# super | |
# end | |
# protected | |
# If you have extra params to permit, append them to the sanitizer. | |
# def configure_sign_in_params | |
# devise_parameter_sanitizer.permit(:sign_in, keys: [:attribute]) | |
# end | |
private | |
def respond_to_on_destroy | |
respond_to do |format| | |
format.any(*navigational_formats) { redirect_to after_sign_out_path_for(resource_name), status: 303 } | |
format.all { head :no_content } | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment