Permalink
Browse files

Everything responds to #to_param

  • Loading branch information...
1 parent 8d24a02 commit 9a0e4437199a233105348938e490808fc0688626 @jeremy jeremy committed Jun 21, 2008
Showing with 1 addition and 3 deletions.
  1. +1 −3 activesupport/lib/active_support/cache.rb
@@ -29,10 +29,8 @@ def self.expand_cache_key(key, namespace = nil)
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

0 comments on commit 9a0e443

Please sign in to comment.