Sha256: 326366a536eba0ba75c402a3af317780167052f451052d12e12c962c8ecd5524

Contents?: true

Size: 1.11 KB

Versions: 6

Compression:

Stored size: 1.11 KB

Contents

require_dependency "tramway/conference/application_controller"

class Tramway::Conference::Web::WelcomeController < ::Tramway::Conference::ApplicationController
  def index
    @unity = ::Tramway::Conference::Unity.includes(:social_networks).first
    @blocks = ::Tramway::Landing::BlockDecorator.decorate ::Tramway::Landing::Block.on_main_page
    @news = ::Tramway::News::News.active.first(3).map { |t| ::Tramway::Landing::Cards::NewsDecorator.new t }
    @links = ::Tramway::Event::EventLinkDecorator.decorate ::Tramway::Event::Event.active
    main_event = ::Tramway::Event::Event.main_event&.last
    if main_event.present?
      @main_event = ::Tramway::Event::EventDecorator.decorate main_event
      @sections_as_features = main_event.sections.order(position: :asc).map { |s| ::Tramway::Event::SectionFeatureDecorator.decorate s }
      @sections = main_event.sections.order(position: :asc).map { |s| ::Tramway::Event::SectionDecorator.decorate s }
      @participant_form = ::Tramway::Event::ParticipantExtendedFormCreator.create_form_class(request.uuid, main_event).new ::Tramway::Event::Participant.new
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tramway-conference-1.5.6 app/controllers/tramway/conference/web/welcome_controller.rb
tramway-conference-1.5.5 app/controllers/tramway/conference/web/welcome_controller.rb
tramway-conference-1.5.4 app/controllers/tramway/conference/web/welcome_controller.rb
tramway-conference-1.5.3 app/controllers/tramway/conference/web/welcome_controller.rb
tramway-conference-1.5.2 app/controllers/tramway/conference/web/welcome_controller.rb
tramway-conference-1.5.1 app/controllers/tramway/conference/web/welcome_controller.rb