aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-06-21 04:19:30 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2008-06-21 04:19:30 -0700
commit9a0e4437199a233105348938e490808fc0688626 (patch)
treed57bb3df385d892ea12f9f5fac6b5b8bd68d0c16 /activesupport
parent8d24a029df47fa9ad36f0e027d3cd447f92af344 (diff)
downloadrails-9a0e4437199a233105348938e490808fc0688626.tar.gz
rails-9a0e4437199a233105348938e490808fc0688626.tar.bz2
rails-9a0e4437199a233105348938e490808fc0688626.zip
Everything responds to #to_param
Diffstat (limited to 'activesupport')
-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