diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-06-20 00:46:00 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-06-20 00:46:00 -0700 |
commit | 00ba4c0cf32f9417d47bd891eba97f2e04609520 (patch) | |
tree | ec99d1ad661db2c3d224744012e14b6b91529931 | |
parent | 879245de1ce294e8951927f0e694333746772187 (diff) | |
download | rails-00ba4c0cf32f9417d47bd891eba97f2e04609520.tar.gz rails-00ba4c0cf32f9417d47bd891eba97f2e04609520.tar.bz2 rails-00ba4c0cf32f9417d47bd891eba97f2e04609520.zip |
true#to_param => true, so be sure to #to_s expanded cache keys
-rw-r--r-- | activesupport/lib/active_support/cache.rb | 18 |
1 files changed, 9 insertions, 9 deletions
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 |