Sha256: 46f614392eb11c740114bf52eddb023ce125a70679bd7ed1e40ce37549bb17d3

Contents?: true

Size: 933 Bytes

Versions: 1

Compression:

Stored size: 933 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]
    @participant_form = ::Tramway::Event::ParticipantExtendedFormCreator.create_form_class(request.uuid, @event).new ::Tramway::Event::Participant.new
    @sections_as_features = @event.sections.order(position: :asc).map { |s| ::Tramway::Event::SectionFeatureDecorator.decorate s }
    @sections = @event.sections.order(position: :asc).map { |s| ::Tramway::Event::SectionDecorator.decorate s }
    @footer = ::Tramway::Landing::BlockDecorator.decorate ::Tramway::Landing::Block.footer
    @events = ::Tramway::Event::Event.active.map { |e| ::Tramway::Event::EventDecorator.decorate e }
    @people_as_features = @event.partakings.map { |p| ::Tramway::Event::PartakingFeatureDecorator.decorate p }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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