Module: Motorhead::ActionView::Renderer

Defined in:
lib/motorhead/action_view.rb

Instance Method Summary collapse

Instance Method Details

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



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

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

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



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

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