Sha256: 6eeebed54ca035582eb2e3c6c0a299e7b3a1f82d6541c71b62cad0210319a1f2

Contents?: true

Size: 411 Bytes

Versions: 23

Compression:

Stored size: 411 Bytes

Contents

module TypeStation
  class PagePresenter < Presenter
    presents :page
    delegate :to_param, :title, :path, :slug, :type, :template_name, :template_name?, :visible?, :redirect_to, :redirect?, :position, to: :page

    form_field :title, type: :text, label: 'Title', required: true

    def children
      TypeStation::Page.where(parent_id: page.id)
    end

    def parent
      page.root
    end

  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
type_station-0.7.0 app/presenters/type_station/page_presenter.rb
type_station-0.6.0 app/presenters/type_station/page_presenter.rb
type_station-0.5.4 app/presenters/type_station/page_presenter.rb
type_station-0.5.3 app/presenters/type_station/page_presenter.rb
type_station-0.5.2 app/presenters/type_station/page_presenter.rb
type_station-0.5.1 app/presenters/type_station/page_presenter.rb
type_station-0.4.7 app/presenters/type_station/page_presenter.rb
type_station-0.4.6 app/presenters/type_station/page_presenter.rb
type_station-0.4.5 app/presenters/type_station/page_presenter.rb
type_station-0.4.4 app/presenters/type_station/page_presenter.rb
type_station-0.4.3 app/presenters/type_station/page_presenter.rb
type_station-0.4.2 app/presenters/type_station/page_presenter.rb
type_station-0.4.1 app/presenters/type_station/page_presenter.rb
type_station-0.4.0 app/presenters/type_station/page_presenter.rb
type_station-0.3.4 app/presenters/type_station/page_presenter.rb
type_station-0.3.3 app/presenters/type_station/page_presenter.rb
type_station-0.3.2 app/presenters/type_station/page_presenter.rb
type_station-0.3.1 app/presenters/type_station/page_presenter.rb
type_station-0.3.0 app/presenters/type_station/page_presenter.rb
type_station-0.2.3 app/presenters/type_station/page_presenter.rb