I'm trying to set a default behaviour after User sign in and sign up.
I've tried creating a registration_controller.rb with the following code:
class RegistrationsController < Devise::RegistrationsController
protected
def after_sign_up_path_for(resource)
"/projects"
end
def after_sign_in_path_for(resource)
raise
"/projects"
end
end
which doesn't even get me to the raise
As a workaround I've managed to make it work creating a method in application_controller.rb as follows:
def after_sign_in_path_for(resource)
"/projects"
end
but I would like to know why I wasn't overriding the default RegistrationsController class.