aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/caching
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-03-05 12:06:43 +0100
committerXavier Noria <fxn@hashref.com>2011-03-05 12:06:43 +0100
commit9092052cb010ab9155cff196ef139cec41695324 (patch)
tree6b8f39ddddef07105820ce825260ebc4e265b12a /actionpack/lib/action_controller/caching
parent34f5628a072f7afa677d25c9559076d5c21721ce (diff)
parent20768176292cbcb883ab152b4aa9ed8c664771cd (diff)
downloadrails-9092052cb010ab9155cff196ef139cec41695324.tar.gz
rails-9092052cb010ab9155cff196ef139cec41695324.tar.bz2
rails-9092052cb010ab9155cff196ef139cec41695324.zip
merges rails
Diffstat (limited to 'actionpack/lib/action_controller/caching')
-rw-r--r--actionpack/lib/action_controller/caching/actions.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/caching/actions.rb b/actionpack/lib/action_controller/caching/actions.rb
index baff6d4be9..2c8a6e4d4d 100644
--- a/actionpack/lib/action_controller/caching/actions.rb
+++ b/actionpack/lib/action_controller/caching/actions.rb
@@ -103,12 +103,14 @@ module ActionController #:nodoc:
end
def _save_fragment(name, options)
- return unless caching_allowed?
-
content = response_body
content = content.join if content.is_a?(Array)
- write_fragment(name, content, options)
+ if caching_allowed?
+ write_fragment(name, content, options)
+ else
+ content
+ end
end
protected