Sha256: 37e139d0bbe78985a2bc1752dc63badea75b39c3a0de58d57d370aa0c8b76e03

Contents?: true

Size: 641 Bytes

Versions: 37

Compression:

Stored size: 641 Bytes

Contents

# frozen_string_literal: true

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

37 entries across 37 versions & 1 rubygems

Version Path
tramway-event-1.9.31.2 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.9.31.1 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.9.31 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.9.30 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.9.29 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.9.28.4 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.9.28.3 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.9.28.2 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.9.28.1 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.9.28 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.9.27.6 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.9.27.5 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.9.27.4 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.9.27.3 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.9.27.2 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.9.27.1 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.9.27 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.9.26 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.9.25.1 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.9.25 app/controllers/tramway/event/participants_controller.rb