diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2012-01-27 20:41:37 +0100 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2012-01-27 20:44:08 +0100 |
commit | 83dbef6074269c3eb742c0506476b3679707dedd (patch) | |
tree | 46c0cf37bbcc7dc4c4cadfd2ae1ffc1a1ede9b00 /activesupport/lib/active_support | |
parent | 69816a830bb2f5c0df1f8f4a6f97fd951e5edb9d (diff) | |
download | rails-83dbef6074269c3eb742c0506476b3679707dedd.tar.gz rails-83dbef6074269c3eb742c0506476b3679707dedd.tar.bz2 rails-83dbef6074269c3eb742c0506476b3679707dedd.zip |
Revert "Fix expanding cache key for single element arrays"
This reverts commit abe915f23777efe10f17d611bf5718ca855a0704.
This broke all existing keys and it's wrong anyway. The array is just there as a convenience option for building the string. It's intentional that [ "stuff"] and "stuff" generates the same key.
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/cache.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb index 7d032ca984..9711ed6f73 100644 --- a/activesupport/lib/active_support/cache.rb +++ b/activesupport/lib/active_support/cache.rb @@ -91,7 +91,7 @@ module ActiveSupport def retrieve_cache_key(key) case when key.respond_to?(:cache_key) then key.cache_key - when key.is_a?(Array) then ['Array', *key.map { |element| retrieve_cache_key(element) }].to_param + when key.is_a?(Array) then key.map { |element| retrieve_cache_key(element) }.to_param else key.to_param end.to_s end |