I have two User and ActiveAdmin models on which I want to apply devise integration.
I have my custom_failure.rb as follows
class CustomFailure < Devise::FailureApp def redirect_url login_path end
It seems to work fine.
Alternatively, you can define in my application controller as:
def after_sign_in_path_for(resource)
and
def after_sign_out_path_for(resource_or_scope) login_path end
But the problem is how to use this resource in custom_failure.rb so that I can redirect accordingly to login for user login or for admin login ? In the current scenario, it is always redirected to the user login page
source share