Module: RenderDebug::PreRenderCallout
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/render_debug/pre_render_callout.rb
Instance Method Summary collapse
Instance Method Details
#render_with_callout(context, options) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/render_debug/pre_render_callout.rb', line 8 def render_with_callout(context, ) initial_render = render_without_callout(context, ) tag = "" if([:partial]) tag = "PARTIAL #{[:partial]}" elsif([:template]) tag = "ACTION #{[:template]} INVOKED FROM #{context.controller.class.to_s}" end if(tag.blank?) initial_render.html_safe else "<!-- #{tag} -->#{initial_render}<!-- END #{tag}-->".html_safe end end |