Class: PushType::ConfirmationsController
- Inherits:
-
Devise::ConfirmationsController
- Object
- Devise::ConfirmationsController
- PushType::ConfirmationsController
- Defined in:
- app/controllers/push_type/confirmations_controller.rb
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
5 6 7 8 |
# File 'app/controllers/push_type/confirmations_controller.rb', line 5 def show self.resource = resource_class.find_by_confirmation_token params[:confirmation_token] super if resource.nil? or resource.confirmed? end |
#update ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/controllers/push_type/confirmations_controller.rb', line 10 def update self.resource = resource_class.find_by_confirmation_token! user_params[:confirmation_token] resource.assign_attributes(user_params) if resource.valid? self.resource.confirm :notice, :confirmed sign_in_and_redirect resource_name, resource else render action: 'show' end end |