You do not have a variable adminfor access, you need to check which parameter is specified for you.
def after_sign_in_path_for(resource)
stored_location_for(resource) ||
if resource.is_a?(Admin)
admin_dashboard_path
else
user_path(resource)
end
end
You also should not redirect inside this method, it should only return a path that the development method can use.
source
share