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
|