aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-07-15 14:41:38 -0500
committerJoshua Peek <josh@joshpeek.com>2008-07-15 14:43:52 -0500
commitaca246ab25497bb6787d2e18680e9f73ad13d223 (patch)
treead107ae39feb55960a4f6faf084b3ad8bc56cbec /actionpack/lib/action_controller
parent4f72feb84c25b54f66c7192c788b7fd965f2d493 (diff)
downloadrails-aca246ab25497bb6787d2e18680e9f73ad13d223.tar.gz
rails-aca246ab25497bb6787d2e18680e9f73ad13d223.tar.bz2
rails-aca246ab25497bb6787d2e18680e9f73ad13d223.zip
Get buffer for fragment cache from template's @output_buffer
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/caching/fragments.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/caching/fragments.rb b/actionpack/lib/action_controller/caching/fragments.rb
index 57b31ec9d1..b1f25fdf5c 100644
--- a/actionpack/lib/action_controller/caching/fragments.rb
+++ b/actionpack/lib/action_controller/caching/fragments.rb
@@ -60,10 +60,8 @@ module ActionController #:nodoc:
ActiveSupport::Cache.expand_cache_key(key.is_a?(Hash) ? url_for(key).split("://").last : key, :views)
end
- def fragment_for(block, name = {}, options = nil) #:nodoc:
+ def fragment_for(buffer, name = {}, options = nil, &block) #:nodoc:
if perform_caching
- buffer = yield
-
if cache = read_fragment(name, options)
buffer.concat(cache)
else