diff --git a/app/controllers/devise/confirmations_controller.rb b/app/controllers/devise/confirmations_controller.rb index 258dc179..39ff669b 100644 --- a/app/controllers/devise/confirmations_controller.rb +++ b/app/controllers/devise/confirmations_controller.rb @@ -27,8 +27,8 @@ class Devise::ConfirmationsController < DeviseController set_flash_message!(:notice, :confirmed) respond_with_navigational(resource){ redirect_to after_confirmation_path_for(resource_name, resource) } else - # Use `error_status` when the default changes to `:unprocessable_content` (or `:unprocessable_entity`). - respond_with_navigational(resource.errors, status: (Devise.responder.error_status != :ok) ? Devise.responder.error_status : Rack::Utils::SYMBOL_TO_STATUS_CODE.key(422) ){ render :new } + # TODO: use `error_status` when the default changes to `:unprocessable_entity` / `:unprocessable_content`. + respond_with_navigational(resource.errors, status: :unprocessable_entity){ render :new } end end diff --git a/app/controllers/devise/unlocks_controller.rb b/app/controllers/devise/unlocks_controller.rb index 43b01447..8cff126c 100644 --- a/app/controllers/devise/unlocks_controller.rb +++ b/app/controllers/devise/unlocks_controller.rb @@ -29,8 +29,8 @@ class Devise::UnlocksController < DeviseController set_flash_message! :notice, :unlocked respond_with_navigational(resource){ redirect_to after_unlock_path_for(resource) } else - # Use `error_status` when the default changes to `:unprocessable_content` (or `:unprocessable_entity`). - respond_with_navigational(resource.errors, status: (Devise.responder.error_status != :ok) ? Devise.responder.error_status : Rack::Utils::SYMBOL_TO_STATUS_CODE.key(422) ){ render :new } + # TODO: use `error_status` when the default changes to `:unprocessable_entity` / `:unprocessable_content`. + respond_with_navigational(resource.errors, status: :unprocessable_entity){ render :new } end end