Sha256: eb64af0410193e38edd676419e8a791c2dcb0d22a689401c9ba38e22b15e6bf0

Contents?: true

Size: 1.29 KB

Versions: 27

Compression:

Stored size: 1.29 KB

Contents

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

  def show
    event = ::Tramway::Event::Event.find params[:id]
    @event = ::Tramway::Event::Events::Show::EventDecorator.decorate event
    @participant_form = ::Tramway::Event::ParticipantExtendedFormCreator.create_form_class(request.uuid, @event).new ::Tramway::Event::Participant.new
    @sections_as_features = @event.sections.active.order(position: :asc).map { |s| ::Tramway::Event::SectionFeatureDecorator.decorate s }
    @sections = @event.sections.active.order(position: :asc).map { |s| ::Tramway::Event::SectionDecorator.decorate s }
    @footer = ::Tramway::Landing::BlockDecorator.decorate ::Tramway::Landing::Block.footer
    @events = ::Tramway::Event::Event.active.actual.map { |e| ::Tramway::Event::Events::Show::EventDecorator.decorate e }
    @people_as_features = @event.partakings.active.map { |p| ::Tramway::Event::PartakingFeatureDecorator.decorate p }
    @partners = ::Tramway::Partner::Partnership.partnership_type.values.reduce({}) do |hash, partnership_type|
      hash.merge! partnership_type => (event.send(partnership_type.to_s.pluralize).active.map do |partner|
        Tramway::Partner::OrganizationFeatureDecorator.decorate partner
      end)
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
tramway-event-1.9.19.1 app/controllers/tramway/event/events_controller.rb
tramway-event-1.9.19 app/controllers/tramway/event/events_controller.rb
tramway-event-1.9.18.2 app/controllers/tramway/event/events_controller.rb
tramway-event-1.9.18.1 app/controllers/tramway/event/events_controller.rb
tramway-event-1.9.18 app/controllers/tramway/event/events_controller.rb
tramway-event-1.9.17 app/controllers/tramway/event/events_controller.rb
tramway-event-1.9.16 app/controllers/tramway/event/events_controller.rb
tramway-event-1.9.15 app/controllers/tramway/event/events_controller.rb
tramway-event-1.9.14 app/controllers/tramway/event/events_controller.rb
tramway-event-1.9.13 app/controllers/tramway/event/events_controller.rb
tramway-event-1.9.12 app/controllers/tramway/event/events_controller.rb
tramway-event-1.9.11.2 app/controllers/tramway/event/events_controller.rb
tramway-event-1.9.11.1 app/controllers/tramway/event/events_controller.rb
tramway-event-1.9.11 app/controllers/tramway/event/events_controller.rb
tramway-event-1.9.10.1 app/controllers/tramway/event/events_controller.rb
tramway-event-1.9.10 app/controllers/tramway/event/events_controller.rb
tramway-event-1.9.9.2 app/controllers/tramway/event/events_controller.rb
tramway-event-1.9.9.1 app/controllers/tramway/event/events_controller.rb
tramway-event-1.9.9 app/controllers/tramway/event/events_controller.rb
tramway-event-1.9.8 app/controllers/tramway/event/events_controller.rb