Module: PufferPages::Extensions::Renderer

Extended by:
ActiveSupport::Concern
Defined in:
lib/puffer_pages/extensions/renderer.rb

Instance Method Summary collapse

Instance Method Details

#render_puffer_page(context, options) ⇒ Object



18
19
20
# File 'lib/puffer_pages/extensions/renderer.rb', line 18

def render_puffer_page(context, options)
  _puffer_page_renderer.render(context, options)
end

#render_with_puffer_pages(context, options) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/puffer_pages/extensions/renderer.rb', line 10

def render_with_puffer_pages(context, options)
  if options.key?(:puffer_page) && options[:puffer_page].is_a?(PufferPages::Page)
    render_puffer_page(context, options)
  else
    render_without_puffer_pages(context, options)
  end
end