From 00ba4c0cf32f9417d47bd891eba97f2e04609520 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 20 Jun 2008 00:46:00 -0700 Subject: true#to_param => true, so be sure to #to_s expanded cache keys --- activesupport/lib/active_support/cache.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'activesupport') diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb index b8ccd35753..27beff9815 100644 --- a/activesupport/lib/active_support/cache.rb +++ b/activesupport/lib/active_support/cache.rb @@ -25,15 +25,15 @@ module ActiveSupport end expanded_cache_key << case - when key.respond_to?(:cache_key) - key.cache_key - when key.is_a?(Array) - key.collect { |element| expand_cache_key(element) }.to_param - when key.respond_to?(:to_param) - key.to_param - else - key.to_s - end + when key.respond_to?(:cache_key) + key.cache_key + when key.is_a?(Array) + key.collect { |element| expand_cache_key(element) }.to_param + when key.respond_to?(:to_param) + key.to_param + else + key + end.to_s expanded_cache_key end -- cgit v1.2.3