Module: Motorhead::ActionView::Renderer

Defined in:
lib/motorhead/action_view.rb

Instance Method Summary collapse

Instance Method Details

#render(context, options, &block) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/motorhead/action_view.rb', line 22

def render(context, options, &block)
  if options.key? :engine
    render_engine(context, options, &block)
  else
    super
  end
end

#render_engine(context, options, &block) ⇒ Object



30
31
32
33
# File 'lib/motorhead/action_view.rb', line 30

def render_engine(context, options, &block)
  partial_name = options.delete :engine
  Motorhead::EngineRenderer.new(@lookup_context).render(context, options.merge(partial: partial_name), block)
end