diff options
Diffstat (limited to 'actionview/lib/action_view/helpers/cache_helper.rb')
| -rw-r--r-- | actionview/lib/action_view/helpers/cache_helper.rb | 11 | 
1 files changed, 2 insertions, 9 deletions
diff --git a/actionview/lib/action_view/helpers/cache_helper.rb b/actionview/lib/action_view/helpers/cache_helper.rb index e473aeaea9..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 @@ -216,14 +217,6 @@ module ActionView          end        end -      # Given a key (as described in ActionController::Caching::Fragments.expire_fragment), -      # returns a key suitable for use in reading, writing, or expiring a -      # cached fragment. All keys are prefixed with <tt>views/</tt> and uses -      # ActiveSupport::Cache.expand_cache_key for the expansion. -      def fragment_cache_key(key) -        ActiveSupport::Cache.expand_cache_key(key.is_a?(Hash) ? url_for(key).split("://").last : key, :views) -      end -      private        def fragment_name_with_digest(name, virtual_path) #:nodoc:  | 
