Class: Pageflow::PartialEditorFragmentRenderer
- Inherits:
-
Object
- Object
- Pageflow::PartialEditorFragmentRenderer
- Defined in:
- lib/pageflow/partial_editor_fragment_renderer.rb
Overview
Helper class to be used as ‘editor_fragment_renderer` of EntryType objects to render fragments from partials.
Instance Method Summary collapse
- #body_fragment(entry) ⇒ Object
- #head_fragment(entry) ⇒ Object
-
#initialize(controller) ⇒ PartialEditorFragmentRenderer
constructor
Create object that implements methods required by ‘editor_fragment_renderer` of EntryType.
- #seed_fragment(entry) ⇒ Object
Constructor Details
#initialize(controller) ⇒ PartialEditorFragmentRenderer
Create object that implements methods required by ‘editor_fragment_renderer` of EntryType.
13 14 15 |
# File 'lib/pageflow/partial_editor_fragment_renderer.rb', line 13 def initialize(controller) @renderer = controller.renderer end |
Instance Method Details
#body_fragment(entry) ⇒ Object
21 22 23 |
# File 'lib/pageflow/partial_editor_fragment_renderer.rb', line 21 def body_fragment(entry) render('body', entry) end |
#head_fragment(entry) ⇒ Object
17 18 19 |
# File 'lib/pageflow/partial_editor_fragment_renderer.rb', line 17 def head_fragment(entry) render('head', entry) end |
#seed_fragment(entry) ⇒ Object
25 26 27 |
# File 'lib/pageflow/partial_editor_fragment_renderer.rb', line 25 def seed_fragment(entry) render('seed', entry, format: :json) end |