mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Merge pull request #1539 from cmeiklejohn/fix_safe_buffer_in_fragment_caching
Fragment caching needs to operate on the pure output, not the safebuffer.
This commit is contained in:
@@ -51,7 +51,9 @@ module ActionView
|
||||
# This dance is needed because Builder can't use capture
|
||||
pos = output_buffer.length
|
||||
yield
|
||||
fragment = output_buffer.slice!(pos..-1)
|
||||
safe_output_buffer = output_buffer.to_str
|
||||
fragment = safe_output_buffer.slice!(pos..-1)
|
||||
self.output_buffer = ActionView::OutputBuffer.new(safe_output_buffer)
|
||||
controller.write_fragment(name, fragment, options)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user