Class: MrCommon::Registrations::PublicController
- Inherits:
-
PublicBaseController
- Object
- BaseController
- PublicBaseController
- MrCommon::Registrations::PublicController
- Defined in:
- app/controllers/mr_common/registrations/public_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/mr_common/registrations/public_controller.rb', line 10 def create @registration = Registration.new(registration_params) if @registration.save RegistrationMailer.confirmation(@registration.id).deliver_now 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
6 7 8 |
# File 'app/controllers/mr_common/registrations/public_controller.rb', line 6 def new @registration = Registration.new end |