Sha256: 68fefb67f584163679ccfd22b2e19f14067a874f421eb387ea0a8b929cfaf0fe

Contents?: true

Size: 403 Bytes

Versions: 3

Compression:

Stored size: 403 Bytes

Contents

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

  delegate :title, to: :object

  def lead
    object.body.first 200
  end

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

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tramway-page-1.3 app/decorators/tramway/page/page_decorator.rb
tramway-page-1.2.2 app/decorators/tramway/page/page_decorator.rb
tramway-page-1.2.1 app/decorators/tramway/page/page_decorator.rb