diff --git a/app/controllers/devise/confirmations_controller.rb b/app/controllers/devise/confirmations_controller.rb index 3ee92436..3d3b496b 100644 --- a/app/controllers/devise/confirmations_controller.rb +++ b/app/controllers/devise/confirmations_controller.rb @@ -11,11 +11,17 @@ class Devise::ConfirmationsController < ApplicationController def create self.resource = resource_class.send_confirmation_instructions(params[resource_name]) - if resource.errors.empty? - set_flash_message(:notice, :send_instructions) if is_navigational_format? - respond_with resource, :location => after_resending_confirmation_instructions_path_for(resource_name) - else + if Devise.paranoid + set_flash_message(:notice, :send_paranoid_instructions) if is_navigational_format? + resource.errors.clear respond_with_navigational(resource){ render_with_scope :new } + else + if resource.errors.empty? + set_flash_message(:notice, :send_instructions) if is_navigational_format? + respond_with resource, :location => after_resending_confirmation_instructions_path_for(resource_name) + else + respond_with_navigational(resource){ render_with_scope :new } + end end end diff --git a/config/locales/en.yml b/config/locales/en.yml index 96ebafb6..099a6103 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -30,6 +30,7 @@ en: send_paranoid_instructions: "If your e-mail exists on our database, you will receive a password recovery link on your e-mail" confirmations: send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.' + send_paranoid_instructions: 'If your e-mail exists on our database, you will receive an email with instructions about how to confirm your account in a few minutes.' confirmed: 'Your account was successfully confirmed. You are now signed in.' registrations: signed_up: 'Welcome! You have signed up successfully.'