diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2012-02-14 21:51:18 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2012-02-14 21:53:15 -0200 |
commit | 5843069e7ecca3e5f71f9b99280beb88b79e4c67 (patch) | |
tree | 4bdafd1aac3f30542ee91bdf8c6dced115fab825 /actionpack/lib/action_controller | |
parent | 4baaf0a0fec19eab68b3e39709f2b6856cee3b43 (diff) | |
download | rails-5843069e7ecca3e5f71f9b99280beb88b79e4c67.tar.gz rails-5843069e7ecca3e5f71f9b99280beb88b79e4c67.tar.bz2 rails-5843069e7ecca3e5f71f9b99280beb88b79e4c67.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')
-rw-r--r-- | actionpack/lib/action_controller/caching/actions.rb | 6 |
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) |