Sha256: e116cfe12c702e430a445b5c0f53f9ff5d9ae945bb371856a0aaa0927f77f66d
Contents?: true
Size: 1.34 KB
Versions: 6
Compression:
Stored size: 1.34 KB
Contents
# frozen_string_literal: true require_dependency 'tramway/conference/application_controller' class Tramway::Conference::Web::WelcomeController < ::Tramway::Conference::ApplicationController def index return unless ::Tramway::Conference::Unity.any? @unity = ::Tramway::Conference::Unity.includes(:social_networks).first @blocks = ::Tramway::Landing::BlockDecorator.decorate ::Tramway::Landing::Block.on_main_page @news = ::Tramway::News::News.first(3).map { |t| ::Tramway::Landing::Cards::NewsDecorator.new t } past_events = ::Tramway::Event::EventLinkDecorator.decorate ::Tramway::Event::Event.past.open.order begin_date: :desc past_events_links = Tramway::Landing::NavbarDecorator.new [{ past_events: past_events }] actual_events = ::Tramway::Event::EventLinkDecorator.decorate ::Tramway::Event::Event.actual.open.order :begin_date @links = actual_events + past_events_links @close_events = ::Tramway::Event::Event.actual.open.map do |event| ::Tramway::Event::EventAsPageWithButtonDecorator.decorate event end @partners = ::Tramway::Partner::Partnership.partnership_type.values.reduce({}) do |hash, partnership_type| hash.merge! partnership_type => (@unity.send(partnership_type.to_s.pluralize).map do |partner| Tramway::Partner::OrganizationFeatureDecorator.decorate partner end) end end end
Version data entries
6 entries across 6 versions & 1 rubygems