Class: Devise::ParanoidVerificationCodeController
- Inherits:
-
DeviseController
- Object
- DeviseController
- Devise::ParanoidVerificationCodeController
- Defined in:
- app/controllers/devise/paranoid_verification_code_controller.rb
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
7 8 9 10 11 12 13 |
# File 'app/controllers/devise/paranoid_verification_code_controller.rb', line 7 def show if !resource.nil? && resource.need_paranoid_verification? respond_with(resource) else redirect_to :root end end |
#update ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'app/controllers/devise/paranoid_verification_code_controller.rb', line 15 def update if resource.verify_code(resource_params[:paranoid_verification_code]) warden.session(scope)['paranoid_verify'] = false :notice, :updated bypass_sign_in resource, scope: scope redirect_to stored_location_for(scope) || :root else respond_with(resource, action: :show) end end |