Module: Ruby19Monkey::ForceEncoding::RenderResult

Defined in:
lib/ruby19_monkey.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



73
74
75
# File 'lib/ruby19_monkey.rb', line 73

def self.included(base)
  base.alias_method_chain :render_template, :encode
end

Instance Method Details

#render_template_with_encode(v, l = {}) ⇒ Object



77
78
79
80
81
# File 'lib/ruby19_monkey.rb', line 77

def render_template_with_encode(v, l = {})
  render_template_without_encode(v, l).tap do |out|
    out && out.force_encoding(ForceEncoding.template_encoding)
  end
end