Class: Viewable::ViewPresenter
- Inherits:
-
ViewablePresenter
- Object
- BasePresenter
- ViewablePresenter
- Viewable::ViewPresenter
- Defined in:
- app/presenters/viewable/view_presenter.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from BasePresenter
Instance Method Summary collapse
- #add_link ⇒ Object
-
#initialize(model, context) ⇒ ViewPresenter
constructor
A new instance of ViewPresenter.
Methods inherited from ViewablePresenter
Methods inherited from BasePresenter
Constructor Details
#initialize(model, context) ⇒ ViewPresenter
Returns a new instance of ViewPresenter.
3 4 5 6 7 |
# File 'app/presenters/viewable/view_presenter.rb', line 3 def initialize(model, context) super set_cms_view end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class BasePresenter
Instance Method Details
#add_link ⇒ Object
9 10 11 12 13 14 15 |
# File 'app/presenters/viewable/view_presenter.rb', line 9 def add_link return unless h.cms_edit_mode? h.link_to add_path, class: "cms-add cms-add-page", 'data-no-turbolink' => true do h.t('cms.add_page') end end |