Class: ActionView::PartialRenderer

Inherits:
Object
  • Object
show all
Defined in:
lib/iqvoc/environments/development.rb

Overview

inject partial name

Instance Method Summary collapse

Instance Method Details

#render_with_source_comment(context, options, block) ⇒ Object



23
24
25
26
27
28
29
30
31
32
# File 'lib/iqvoc/environments/development.rb', line 23

def render_with_source_comment(context, options, block)
  res = render_without_source_comment(context, options, block)
  template = find_template
  if template.formats.include?(:html)
    "<!-- Partial: #{template.inspect} -->\n".html_safe << res <<
      "<!-- /Partial -->\n".html_safe
  else
    res
  end
end