Sha256: a8f5c35e9f2d2643ae99ceb2d4daa4c5a60152e1a65aeedacd7815e781845307

Contents?: true

Size: 615 Bytes

Versions: 1

Compression:

Stored size: 615 Bytes

Contents

class Tramway::Event::EventsController < Tramway::Event::ApplicationController
  layout 'tramway/landing/application'

  def show
    @event = ::Tramway::Event::EventDecorator.decorate ::Tramway::Event::Event.find params[:id]
    class_name = "ParticipantExtendedForm#{request.uuid.gsub('-', '')}"
    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
    @sections = @event.sections.map { |s| ::Tramway::Event::SectionFeatureDecorator.decorate s }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tramway-event-1.1 app/controllers/tramway/event/events_controller.rb