I have followed the directions here:
I am succesfully using my own registrations controller. Here is my routes code:
devise_for :users, controllers: {registrations: "users/registrations", sessions: "users/sessions", passwords: "users/passwords", confirmations: "users/confirmations"}
Here is my controller code:
class Users::RegistrationsController < Devise::RegistrationsController
def new
super
end
def create
puts "in my custom create action"
super
end
protected
def after_sign_up_path_for(resource)
puts "in after sign up path for"
if resource.new_record? #user not created. Do default behavior: render new user page
puts "new record"
else #user created
puts "user created"
return new_user_session_path
end
end
end
I know the create action is being called because the puts "in my custom create action"
appears in the server logs. For some reason, after_sign_up_path_for(resource) is not being called. I am using Devise confirmable - will that make a difference. How do I fix this?