Class: Refinery::Pages::PagePartSectionPresenter
- Inherits:
-
SectionPresenter
- Object
- SectionPresenter
- Refinery::Pages::PagePartSectionPresenter
- Defined in:
- lib/refinery/pages/page_part_section_presenter.rb
Overview
A type of SectionPresenter which knows how to render a section which displays a PagePart model.
Instance Attribute Summary
Attributes inherited from SectionPresenter
#fallback_html, #hidden, #id, #override_html
Instance Method Summary collapse
-
#initialize(page_part) ⇒ PagePartSectionPresenter
constructor
A new instance of PagePartSectionPresenter.
Methods inherited from SectionPresenter
#has_content?, #hide, #not_present_css_class, #visible?, #wrapped_html
Constructor Details
#initialize(page_part) ⇒ PagePartSectionPresenter
Returns a new instance of PagePartSectionPresenter.
6 7 8 9 10 |
# File 'lib/refinery/pages/page_part_section_presenter.rb', line 6 def initialize(page_part) super() self.fallback_html = page_part.body.html_safe if page_part.body self.id = convert_title_to_id(page_part.title) if page_part.title end |