Sha256: 7645db749607d777d64a7ff9483b9f0ebcef1e2b2670671d2ba9a97e8e76347b

Contents?: true

Size: 610 Bytes

Versions: 5

Compression:

Stored size: 610 Bytes

Contents

class Tramway::Event::ParticipantsController < Tramway::Event::ApplicationController
  def create
    event = ::Tramway::Event::Event.find params[:tramway_event_participant][:event_id]
    @participant_form = ::Tramway::Event::ParticipantExtendedFormCreator.create_form_class(request.uuid, event).new ::Tramway::Event::Participant.new event_id: event.id
    if @participant_form.submit params[:tramway_event_participant].except :event_id
      redirect_to event_path event, flash: :success
    else
      redirect_to event_path event, flash: :error, errors: @participant_form.errors.messages
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
tramway-event-1.9.19.1 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.9.19 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.9.18.2 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.9.18.1 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.9.18 app/controllers/tramway/event/participants_controller.rb