Sha256: a66000269e083b042392c04568dd1ce8bac6474c2b7705ac5f4182ada78ec3b3

Contents?: true

Size: 661 Bytes

Versions: 69

Compression:

Stored size: 661 Bytes

Contents

# frozen_string_literal: true

class Tramway::Event::SectionDecorator < ::Tramway::Landing::BlockTypes::FeaturesDecorator
  class << self
    def collections
      [:all]
    end
  end

  delegate :description, to: :object
  decorate_association :event
  decorate_association :partakings, decorator: Tramway::Event::PartakingFeatureDecorator

  def name
    "#{object.title} | #{object.event.title}"
  end

  def title
    "#{fa_icon(object.icon)} #{object.title}".html_safe
  end

  def background
    object.photo
  end

  def anchor
    "section-#{object.id}"
  end

  def event_title
    event.title
  end

  def event_duration
    event.duration
  end
end

Version data entries

69 entries across 69 versions & 1 rubygems

Version Path
tramway-event-1.9.20.1 app/decorators/tramway/event/section_decorator.rb
tramway-event-1.9.20 app/decorators/tramway/event/section_decorator.rb
tramway-event-1.9.19.8 app/decorators/tramway/event/section_decorator.rb
tramway-event-1.9.19.7 app/decorators/tramway/event/section_decorator.rb
tramway-event-1.9.19.6 app/decorators/tramway/event/section_decorator.rb
tramway-event-1.9.19.5 app/decorators/tramway/event/section_decorator.rb
tramway-event-1.9.19.4 app/decorators/tramway/event/section_decorator.rb
tramway-event-1.9.19.3 app/decorators/tramway/event/section_decorator.rb
tramway-event-1.9.19.2 app/decorators/tramway/event/section_decorator.rb