From 83dbef6074269c3eb742c0506476b3679707dedd Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 27 Jan 2012 20:41:37 +0100 Subject: 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. --- activesupport/lib/active_support/cache.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/cache.rb') 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 -- cgit v1.2.3