Module: Immunio::TemplateRendererHooks

Extended by:
ActiveSupport::Concern
Defined in:
lib/immunio/plugins/action_view.rb

Overview

Hook for the ‘ActionView::TemplateRenderer`. These are called for root templates.

Instance Method Summary collapse

Instance Method Details

#render_template_with_immunio(template, *args) ⇒ Object



501
502
503
504
505
506
507
508
509
510
511
# File 'lib/immunio/plugins/action_view.rb', line 501

def render_template_with_immunio(template, *args)
  Request.time "plugin", "#{Module.nesting[0]}::#{__method__}" do
    renderer = Template.new(template)

    renderer.render @view do
      Request.pause "plugin", "#{Module.nesting[0]}::#{__method__}" do
        render_template_without_immunio(template, *args)
      end
    end
  end
end