Class: Devise::ParanoidVerificationCodeController
- Inherits:
-
DeviseController
- Object
- DeviseController
- Devise::ParanoidVerificationCodeController
- Defined in:
- app/controllers/devise/paranoid_verification_code_controller.rb
Instance Method Summary collapse
-
#after_paranoid_verification_code_update_path_for(_resource) ⇒ String, Symbol
Allows you to customize where the user is redirected to after the update action successfully completes.
- #show ⇒ Object
- #update ⇒ Object
Instance Method Details
#after_paranoid_verification_code_update_path_for(_resource) ⇒ String, Symbol
Allows you to customize where the user is redirected to after the update action successfully completes.
Defaults to the request’s original path, and then root if that is nil.
32 33 34 |
# File 'app/controllers/devise/paranoid_verification_code_controller.rb', line 32 def after_paranoid_verification_code_update_path_for(_resource) stored_location_for(scope) || :root end |
#show ⇒ Object
9 10 11 |
# File 'app/controllers/devise/paranoid_verification_code_controller.rb', line 9 def show respond_with(resource) end |
#update ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/devise/paranoid_verification_code_controller.rb', line 13 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 respond_with({}, location: after_paranoid_verification_code_update_path_for(resource)) else respond_with(resource, action: :show) end end |