Sha256: 5bba0bacbbda32aaa919b4d4ed3a2a47a0c4b03036fd0dedba06872eb03256d1
Contents?: true
Size: 689 Bytes
Versions: 1
Compression:
Stored size: 689 Bytes
Contents
class Tramway::Event::ParticipantsController < Tramway::Event::ApplicationController def create event = ::Tramway::Event::Event.find params[:tramway_event_participant][:event_id] class_name = "ParticipantExtendedFormEventId#{event.id}" form_class = ::Tramway::Core::ExtendableForm.new(class_name, *(event.participant_form_fields.inputs_list.map(&:title)).map(&:to_sym)) @participant_form = form_class.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 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tramway-event-0.6 | app/controllers/tramway/event/participants_controller.rb |