Sha256: 12a88a4d44fae77969e45da8a4baf3b3bd78db4f03bfad56d374ae8bcc414a8c

Contents?: true

Size: 554 Bytes

Versions: 17

Compression:

Stored size: 554 Bytes

Contents

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

    def list_attributes
      [ :event_title ]
    end
  end

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

  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
    object.event.title
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
tramway-event-1.8.8 app/decorators/tramway/event/section_decorator.rb
tramway-event-1.8.7 app/decorators/tramway/event/section_decorator.rb
tramway-event-1.8.6 app/decorators/tramway/event/section_decorator.rb
tramway-event-1.8.5 app/decorators/tramway/event/section_decorator.rb
tramway-event-1.8.4 app/decorators/tramway/event/section_decorator.rb
tramway-event-1.8.3 app/decorators/tramway/event/section_decorator.rb
tramway-event-1.8.2 app/decorators/tramway/event/section_decorator.rb
tramway-event-1.8.1.1 app/decorators/tramway/event/section_decorator.rb
tramway-event-1.8.1 app/decorators/tramway/event/section_decorator.rb
tramway-event-1.8 app/decorators/tramway/event/section_decorator.rb
tramway-event-1.7.2 app/decorators/tramway/event/section_decorator.rb
tramway-event-1.7.1 app/decorators/tramway/event/section_decorator.rb
tramway-event-1.7 app/decorators/tramway/event/section_decorator.rb
tramway-event-1.6.4 app/decorators/tramway/event/section_decorator.rb
tramway-event-1.6.3 app/decorators/tramway/event/section_decorator.rb
tramway-event-1.6.2 app/decorators/tramway/event/section_decorator.rb
tramway-event-1.6.1 app/decorators/tramway/event/section_decorator.rb