Permalink
Browse files

true#to_param => true, so be sure to #to_s expanded cache keys

  • Loading branch information...
1 parent 879245d commit 00ba4c0cf32f9417d47bd891eba97f2e04609520 @jeremy jeremy committed Jun 20, 2008
Showing with 9 additions and 9 deletions.
  1. +9 −9 activesupport/lib/active_support/cache.rb
@@ -25,15 +25,15 @@ def self.expand_cache_key(key, namespace = nil)
end
expanded_cache_key << case
- when key.respond_to?(:cache_key)
- key.cache_key
- when key.is_a?(Array)
- key.collect { |element| expand_cache_key(element) }.to_param
- when key.respond_to?(:to_param)
- key.to_param
- else
- key.to_s
- end
+ when key.respond_to?(:cache_key)
+ key.cache_key
+ when key.is_a?(Array)
+ key.collect { |element| expand_cache_key(element) }.to_param
+ when key.respond_to?(:to_param)
+ key.to_param
+ else
+ key
+ end.to_s
expanded_cache_key
end

0 comments on commit 00ba4c0

Please sign in to comment.