Sha256: 637e7d1ea5aa0a272d751c0399ab0554cc103eb0d84586d5c9838b866147e5e9

Contents?: true

Size: 684 Bytes

Versions: 42

Compression:

Stored size: 684 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, participant: @participant_form.attributes
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
tramway-event-2.0.1 app/controllers/tramway/event/participants_controller.rb
tramway-event-2.0.0.1 app/controllers/tramway/event/participants_controller.rb
tramway-event-2.0 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.12.9.1 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.12.9 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.12.8.2 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.12.8.1 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.12.8 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.12.7 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.12.6.4 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.12.6.3 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.12.6.2 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.12.6 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.12.5 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.12.4 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.12.3.10 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.12.3.9 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.12.3.8 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.12.3.7 app/controllers/tramway/event/participants_controller.rb
tramway-event-1.12.3.6 app/controllers/tramway/event/participants_controller.rb