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

#newObject

The default redirect doesn’t respect nested resources here



27
28
29
30
31
32
33
34
35
36
# File 'app/controllers/effective/event_registrations_controller.rb', line 27

def new
  self.resource ||= (find_wizard_resource || resource_scope.new)
  EffectiveResources.authorize!(self, :new, resource)

  redirect_to effective_events.event_event_registration_build_path(
    resource.event,
    (resource.to_param || :new),
    (resource.first_uncompleted_step || resource_wizard_steps.first)
  )
end