I recently upgraded from Devise 1.2 to 1.4.9, and everything seems to work except my confirmation module. Email works the same way as the whole process. But the confirmation page is always blank. It works, and it confirms the email account, but does not redirect the user and gives a 406 error. It does the same for attempts of false confirmation.
The routes seem to be working fine, I confirm what is listed in my user model and nothing else has changed.
Any ideas? Am I missing some settings or something that I need to update for 1.4.9?
UPDATE
There seems to be a problem with the url being generated. For some unknown reason, is it adding a confirmation URL with a username? and it makes him break. But I'm still not sure how to fix this.
http: // localhost: 5000 / users / confirmation.someusername? confirmation_token = R7apAPhC5c3rszvhsowp
The username in the above URL causes the process to not work.
I checked the diff between the controller in 1.2 (which works) and the new version.
1.2
# GET /resource/confirmation?confirmation_token=abcdef def show self.resource = resource_class.confirm_by_token(params[:confirmation_token]) if resource.errors.empty? set_flash_message :notice, :confirmed sign_in_and_redirect(resource_name, resource) else render_with_scope :new end end
1.4.9
# GET /resource/confirmation?confirmation_token=abcdef def show self.resource = resource_class.confirm_by_token(params[:confirmation_token]) if resource.errors.empty? set_flash_message(:notice, :confirmed) if is_navigational_format? sign_in(resource_name, resource) respond_with_navigational(resource){ redirect_to after_confirmation_path_for(resource_name, resource) } else respond_with_navigational(resource.errors, :status => :unprocessable_entity){ render_with_scope :new } end end protected
Error
Started GET "/users/confirmation.sdfsdfsd?confirmation_token=vmxmx73xvM7sUfcvH9CX" for 127.0.0.1 at 2011-10-31 13:30:33 +0100 Processing by Devise::ConfirmationsController