Sha256: e829b6162e7a2a8017d84ba38d368ffa06aa99fdbfdb5ded41b61f2c7346d6f8

Contents?: true

Size: 267 Bytes

Versions: 6

Compression:

Stored size: 267 Bytes

Contents

# frozen_string_literal: true

class Tramway::Landing::Cards::NewsDecorator < ::Tramway::Landing::BlockTypes::CardsDecorator
  def image
    object.photo.card.url
  end

  def description
    object.body.first 200
  end

  def path
    "/news/#{object.id}"
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tramway-news-1.0.4.6 app/decorators/tramway/landing/cards/news_decorator.rb
tramway-news-1.0.4.5 app/decorators/tramway/landing/cards/news_decorator.rb
tramway-news-1.0.4.4 app/decorators/tramway/landing/cards/news_decorator.rb
tramway-news-1.0.5 app/decorators/tramway/landing/cards/news_decorator.rb
tramway-news-1.0.4.3 app/decorators/tramway/landing/cards/news_decorator.rb
tramway-news-1.0.4.2 app/decorators/tramway/landing/cards/news_decorator.rb