aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/caching
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2012-02-14 21:51:18 -0200
committerSantiago Pastorino <santiago@wyeworks.com>2012-02-14 21:53:38 -0200
commit7c79996c6754f6d7dd67f43d279a63121ee71a9b (patch)
tree3932edf8c25e30b8449d7e334ad559f21ed83cf1 /actionpack/lib/action_controller/caching
parent5f9a5a51deb3c7f41993c4a3e7fa5cbbf342113f (diff)
downloadrails-7c79996c6754f6d7dd67f43d279a63121ee71a9b.tar.gz
rails-7c79996c6754f6d7dd67f43d279a63121ee71a9b.tar.bz2
rails-7c79996c6754f6d7dd67f43d279a63121ee71a9b.zip
Rack body respond to each and not to join
This fixes undef `to_str' for Rack::Chunked::Body when using caches_action + streaming on an action Closes #5027
Diffstat (limited to 'actionpack/lib/action_controller/caching')
-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 3b86a9a93a..a8aed4281b 100644
--- a/actionpack/lib/action_controller/caching/actions.rb
+++ b/actionpack/lib/action_controller/caching/actions.rb
@@ -102,8 +102,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)