I am trying to have devise redirect to a custom page after registration. It is not working. I have the following custom registrations controller:
class RegistrationsController < Devise::RegistrationsController
protected
puts 'Registrations controller is happening"
def after_sign_up_path_for(resource)
puts 'after_sign_up_path_for is working'
"http://www.google.com"
end
def after_inactive_sign_up_path_for(resource)
puts 'after_inactive_sign_up_path_for is working'
"http://www.google.com"
end
end
And here is my custom routes:
devise_for :users, :controllers => { :registrations => :registrations }
So what is interesting is that the registration controller is working, because the first puts statement shows up in the server logs. However, the second and third put statements (inside the after_sign_up_path_for and after_inactive_sign_up_path_for) are not appearing.
How can I get a redirect after registering to work?