Class: Refinery::Pages::PagePartSectionPresenter

Inherits:
SectionPresenter show all
Defined in:
pages/app/presenters/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

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 'pages/app/presenters/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 = page_part.slug.to_sym if page_part.slug
end