Sha256: 7e64e7735e586ad085e53e683467e2f122c006979c8df1c4fab6513bd6dc637b

Contents?: true

Size: 279 Bytes

Versions: 3

Compression:

Stored size: 279 Bytes

Contents

class Tramway::Page::PageDecorator < ::Tramway::Core::ApplicationDecorator
  class << self
    def collections
      [ :all ]
    end
  end

  def lead
    object.body.first 200
  end

  def link
    Tramway::Page::Engine.routes.url_helpers.page_path slug: object.slug
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tramway-page-1.2 app/decorators/tramway/page/page_decorator.rb
tramway-page-1.1.3 app/decorators/tramway/page/page_decorator.rb
tramway-page-1.1.2 app/decorators/tramway/page/page_decorator.rb