aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activesupport/lib/active_support/cache.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb
index 27beff9815..3e3dc18263 100644
--- a/activesupport/lib/active_support/cache.rb
+++ b/activesupport/lib/active_support/cache.rb
@@ -29,10 +29,8 @@ module ActiveSupport
key.cache_key
when key.is_a?(Array)
key.collect { |element| expand_cache_key(element) }.to_param
- when key.respond_to?(:to_param)
+ when key
key.to_param
- else
- key
end.to_s
expanded_cache_key