mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Slice out options for cache_fragment_name explicitly
This allows expire_in (and other options) to be passed to the cache method
This commit is contained in:
parent
2c131141ca
commit
e2ca039e5a
1 changed files with 2 additions and 1 deletions
|
@ -166,7 +166,8 @@ module ActionView
|
|||
# You can only declare one collection in a partial template file.
|
||||
def cache(name = {}, options = {}, &block)
|
||||
if controller.respond_to?(:perform_caching) && controller.perform_caching
|
||||
safe_concat(fragment_for(cache_fragment_name(name, options), options, &block))
|
||||
name_options = options.slice(:skip_digest, :virtual_path)
|
||||
safe_concat(fragment_for(cache_fragment_name(name, name_options), options, &block))
|
||||
else
|
||||
yield
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue