Class: ActionView::TemplateRenderer

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

Overview

inject template name

Instance Method Summary collapse

Instance Method Details

#render_with_source_comment(context, options) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/iqvoc/environments/development.rb', line 6

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