diff options
author | Ryan Bigg <git@ryanbigg.com> | 2016-01-28 10:52:22 +1100 |
---|---|---|
committer | Ryan Bigg <git@ryanbigg.com> | 2016-01-28 11:02:48 +1100 |
commit | e2ca039e5a4f819af70d794931c491b71c812335 (patch) | |
tree | 94e7faa3d64ffd633b5335bbcdae58226afd82f5 | |
parent | 2c131141ca5018f41f85be429a02afac93a0241d (diff) | |
download | rails-e2ca039e5a4f819af70d794931c491b71c812335.tar.gz rails-e2ca039e5a4f819af70d794931c491b71c812335.tar.bz2 rails-e2ca039e5a4f819af70d794931c491b71c812335.zip |
Slice out options for cache_fragment_name explicitly
This allows expire_in (and other options) to be passed to the cache method
-rw-r--r-- | actionview/lib/action_view/helpers/cache_helper.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/cache_helper.rb b/actionview/lib/action_view/helpers/cache_helper.rb index 18b2102d73..401f398721 100644 --- a/actionview/lib/action_view/helpers/cache_helper.rb +++ b/actionview/lib/action_view/helpers/cache_helper.rb @@ -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 |