Class: TypeStation::PagePresenter

Inherits:
Presenter show all
Defined in:
app/presenters/type_station/page_presenter.rb

Instance Method Summary collapse

Methods inherited from Presenter

#create, #delete, #edit, #field, form_field, #move

Methods inherited from BasePresenter

#initialize

Constructor Details

This class inherits a constructor from TypeStation::BasePresenter

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class TypeStation::BasePresenter

Instance Method Details

#childrenObject



8
9
10
# File 'app/presenters/type_station/page_presenter.rb', line 8

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

#parentObject



12
13
14
# File 'app/presenters/type_station/page_presenter.rb', line 12

def parent
  page.root
end