Class: Effective::EventRegistrationsController

Inherits:
ApplicationController
  • Object
show all
Includes:
WizardController
Defined in:
app/controllers/effective/event_registrations_controller.rb

Instance Method Summary collapse

Instance Method Details

#redirect_unless_registerableObject

If the event is no longer registerable, do not let them continue



17
18
19
20
21
22
23
24
25
26
# File 'app/controllers/effective/event_registrations_controller.rb', line 17

def redirect_unless_registerable
  return if resource.blank?
  return if resource.
  return if resource.event.blank?
  return if resource.event.registerable?
  return if resource.submit_order&.deferred?

  flash[:danger] = "Your selected event is no longer available for registration. This event registration is no longer available."
  return redirect_to('/dashboard')
end