diff options
author | José Valim <jose.valim@gmail.com> | 2011-12-16 14:40:09 -0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-12-16 14:40:09 -0800 |
commit | 4f35d5a18b1192f03c36b23b2f6a8b3b2d2c0347 (patch) | |
tree | 804acfdb76d559aac44a31ea158abc2f3ee844d9 /activesupport/lib | |
parent | 0065f378262dc3f47880ce6211c7474bc7d11f0b (diff) | |
parent | abe915f23777efe10f17d611bf5718ca855a0704 (diff) | |
download | rails-4f35d5a18b1192f03c36b23b2f6a8b3b2d2c0347.tar.gz rails-4f35d5a18b1192f03c36b23b2f6a8b3b2d2c0347.tar.bz2 rails-4f35d5a18b1192f03c36b23b2f6a8b3b2d2c0347.zip |
Merge pull request #4007 from exviva/expand_cache_key_for_one_element_array
Fix expanding cache key for single element arrays
Diffstat (limited to 'activesupport/lib')
-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 9711ed6f73..7d032ca984 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 key.map { |element| retrieve_cache_key(element) }.to_param + when key.is_a?(Array) then ['Array', *key.map { |element| retrieve_cache_key(element) }].to_param else key.to_param end.to_s end |