diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-07-16 17:45:28 -0500 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-07-16 17:45:28 -0500 |
commit | 73ade4fe100ae7f48c5f95dcdf7067f6a0cd51fa (patch) | |
tree | 2f1601292978a844226e16f3cef428ed760b9eb5 /actionpack/lib/action_controller/caching/fragments.rb | |
parent | 8fe01de2e8753d045408ecde3178ab4e9192bf9a (diff) | |
parent | 90c930f45c5c6766306929241462ffff8f67b86e (diff) | |
download | rails-73ade4fe100ae7f48c5f95dcdf7067f6a0cd51fa.tar.gz rails-73ade4fe100ae7f48c5f95dcdf7067f6a0cd51fa.tar.bz2 rails-73ade4fe100ae7f48c5f95dcdf7067f6a0cd51fa.zip |
Resolved conflict
Diffstat (limited to 'actionpack/lib/action_controller/caching/fragments.rb')
-rw-r--r-- | actionpack/lib/action_controller/caching/fragments.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/caching/fragments.rb b/actionpack/lib/action_controller/caching/fragments.rb index 57b31ec9d1..e9b434dd25 100644 --- a/actionpack/lib/action_controller/caching/fragments.rb +++ b/actionpack/lib/action_controller/caching/fragments.rb @@ -2,7 +2,7 @@ module ActionController #:nodoc: module Caching # Fragment caching is used for caching various blocks within templates without caching the entire action as a whole. This is useful when # certain elements of an action change frequently or depend on complicated state while other parts rarely change or can be shared amongst multiple - # parties. The caching is doing using the cache helper available in the Action View. A template with caching might look something like: + # parties. The caching is done using the cache helper available in the Action View. A template with caching might look something like: # # <b>Hello <%= @name %></b> # <% cache do %> @@ -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 |