Class: MrCommon::Registrations::PublicController
- Inherits:
-
PublicBaseController
- Object
- BaseController
- PublicBaseController
- MrCommon::Registrations::PublicController
- Defined in:
- app/controllers/mr_common/registrations/public_controller.rb
Overview
Implements public Registration actions available from the landing page.
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/mr_common/registrations/public_controller.rb', line 11 def create @registration = Registration.new(registration_params) @registration.confirmed = true if should_confirm_registration? if @registration.save send_notification redirect_to registrations_success_index_path, notice: MrCommon.registration_success_notice else flash.now[:alert] = MrCommon.registration_failure_alert if MrCommon.registration_failure_alert.present? render :new, status: :unprocessable_entity end end |
#new ⇒ Object
7 8 9 |
# File 'app/controllers/mr_common/registrations/public_controller.rb', line 7 def new @registration = Registration.new end |