aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/template_handlers/erb.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/template_handlers/erb.rb')
-rw-r--r--actionpack/lib/action_view/template_handlers/erb.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/template_handlers/erb.rb b/actionpack/lib/action_view/template_handlers/erb.rb
index 15a9064461..ad4ccc7c42 100644
--- a/actionpack/lib/action_view/template_handlers/erb.rb
+++ b/actionpack/lib/action_view/template_handlers/erb.rb
@@ -43,13 +43,11 @@ module ActionView
include Compilable
def compile(template)
- ::ERB.new(template.source, nil, @view.erb_trim_mode).src
+ ::ERB.new(template.source, nil, @view.erb_trim_mode, '@output_buffer').src
end
def cache_fragment(block, name = {}, options = nil) #:nodoc:
- @view.fragment_for(block, name, options) do
- eval(ActionView::Base.erb_variable, block.binding)
- end
+ @view.fragment_for(block, name, options) { @view.response.template.output_buffer ||= '' }
end
end
end