Class: Devise::RevocationsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Devise::RevocationsController
- Includes:
- Controllers::InternalHelpers
- Defined in:
- app/controllers/devise/revocations_controller.rb
Instance Method Summary collapse
-
#edit ⇒ Object
GET /resource/revocation/confirm?revocation_token=abcdef.
-
#update ⇒ Object
PUT /resource/revocation.
Instance Method Details
#edit ⇒ Object
GET /resource/revocation/confirm?revocation_token=abcdef
5 6 7 8 9 10 11 |
# File 'app/controllers/devise/revocations_controller.rb', line 5 def edit if params[:revocation_token] && self.resource = resource_class.find_by_revocation_token(params[:revocation_token]) render_with_scope :edit else set_error_and_redirect end end |
#update ⇒ Object
PUT /resource/revocation
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/controllers/devise/revocations_controller.rb', line 14 def update token = params[resource_name].try(:[], :revocation_token) self.resource = resource_class.revoke_by_token(token) if resource.errors.empty? :notice, :updated sign_out(self.resource) render_with_scope :edit else set_error_and_redirect end end |