Class: Effective::EventRegistrationsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Effective::EventRegistrationsController
- Includes:
- WizardController
- Defined in:
- app/controllers/effective/event_registrations_controller.rb
Instance Method Summary collapse
- #expire_ticket_selection_window ⇒ Object
-
#redirect_unless_registerable ⇒ Object
If the event is no longer registerable, do not let them continue.
Instance Method Details
#expire_ticket_selection_window ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'app/controllers/effective/event_registrations_controller.rb', line 29 def expire_ticket_selection_window return if resource.blank? return if resource.was_submitted? return if resource.event.blank? return if resource.selection_not_expired? resource.ticket_selection_expired! flash[:danger] = "Your ticket reservation window has expired. Your tickets are no longer reserved. Please start over." return redirect_to(wizard_path(:start)) end |
#redirect_unless_registerable ⇒ Object
If the event is no longer registerable, do not let them continue
18 19 20 21 22 23 24 25 26 27 |
# File 'app/controllers/effective/event_registrations_controller.rb', line 18 def redirect_unless_registerable return if resource.blank? return if resource.was_submitted? return if resource.event.blank? return if resource.submit_order&.deferred? return if resource.event.registerable? && !resource.event.sold_out?(except: resource) flash[:danger] = "Your selected event is no longer available for registration. This event registration is no longer available." return redirect_to(view_context.return_to_dashboard_path) end |