Sha256: 6619fd96bdc3620bda44b911e1b5db8a48e668337bc0cb3a5295837269b6ed84

Contents?: true

Size: 364 Bytes

Versions: 34

Compression:

Stored size: 364 Bytes

Contents

class ::Tramway::Event::SectionFeatureDecorator < ::Tramway::Core::ApplicationDecorator
  delegate :icon, to: :object
  delegate :title, to: :object
  delegate :description, to: :object

  def text
    object.description.scan(/<strong>.*?<\/strong>/).join(' ')
  end

  def image
    object.photo.small.url
  end

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

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
tramway-event-1.5.4 app/decorators/tramway/event/section_feature_decorator.rb
tramway-event-1.5.3 app/decorators/tramway/event/section_feature_decorator.rb
tramway-event-1.5.2 app/decorators/tramway/event/section_feature_decorator.rb
tramway-event-1.5.1 app/decorators/tramway/event/section_feature_decorator.rb
tramway-event-1.5 app/decorators/tramway/event/section_feature_decorator.rb
tramway-event-1.4 app/decorators/tramway/event/section_feature_decorator.rb
tramway-event-1.3 app/decorators/tramway/event/section_feature_decorator.rb
tramway-event-1.2.6 app/decorators/tramway/event/section_feature_decorator.rb
tramway-event-1.2.5 app/decorators/tramway/event/section_feature_decorator.rb
tramway-event-1.2.4 app/decorators/tramway/event/section_feature_decorator.rb
tramway-event-1.2.3 app/decorators/tramway/event/section_feature_decorator.rb
tramway-event-1.2.2 app/decorators/tramway/event/section_feature_decorator.rb
tramway-event-1.2.1 app/decorators/tramway/event/section_feature_decorator.rb
tramway-event-1.2 app/decorators/tramway/event/section_feature_decorator.rb