Class: ActionView::PartialRenderer

Inherits:
Object
  • Object
show all
Defined in:
lib/fluoroscope/rendering.rb

Instance Method Summary collapse

Instance Method Details

#render(context, options, block) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/fluoroscope/rendering.rb', line 4

def render(context, options, block)
  if fluoroscope_enabled?(context.request)
    setup(context, options, block)
    fluoroscope_renderer = PartialRenderer.new(@lookup_context)
    template = find_template(path=@path, locals=@locals.keys)
    locals = options[:locals].nil? ? {:template => template} : {:template => template}.merge(options[:locals])

    fluoroscope_renderer.render_original(context,
                              {:partial => '/fluoroscope/fluoroscope_wrapper',
                               :locals => locals
                              }, lambda{render_original(context, options, block)})

  else
    render_original(context, options, block)
  end
end

#render_originalObject



3
# File 'lib/fluoroscope/rendering.rb', line 3

alias_method :render_original, :render