Class: MrCommon::Registrations::ConfirmationsController
- Inherits:
-
BaseController
- Object
- BaseController
- MrCommon::Registrations::ConfirmationsController
- Defined in:
- app/controllers/mr_common/registrations/confirmations_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
Confirm a registration.
-
#destroy ⇒ Object
Revoke a registration’s confirmation.
Instance Method Details
#create ⇒ Object
Confirm a registration.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/mr_common/registrations/confirmations_controller.rb', line 7 def create find_registration if confirm_registration send_notification redirect_to @registration, notice: "Registration confirmed. Registrant will receive an email." else Rails.logger.debug(@registration.errors.) redirect_to @registration, alert: "Unable to confirm registration" end end |
#destroy ⇒ Object
Revoke a registration’s confirmation.
20 21 22 23 24 25 26 27 28 29 30 |
# File 'app/controllers/mr_common/registrations/confirmations_controller.rb', line 20 def destroy find_registration if unconfirm_registration send_notification redirect_to @registration, notice: "Confirmation revoked. Registrant will receive an email." else Rails.logger.debug(@registration.errors.) redirect_to @registration, alert: "Unable to revoke confirmation" end end |