aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/caching/actions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/caching/actions.rb')
-rw-r--r--actionpack/lib/action_controller/caching/actions.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/caching/actions.rb b/actionpack/lib/action_controller/caching/actions.rb
index bd3b0b5df3..ba96735e56 100644
--- a/actionpack/lib/action_controller/caching/actions.rb
+++ b/actionpack/lib/action_controller/caching/actions.rb
@@ -103,8 +103,10 @@ module ActionController #:nodoc:
end
def _save_fragment(name, options)
- content = response_body
- content = content.join if content.is_a?(Array)
+ content = ""
+ response_body.each do |parts|
+ content << parts
+ end
if caching_allowed?
write_fragment(name, content, options)