Skip to content

Commit

Permalink
true#to_param => true, so be sure to #to_s expanded cache keys
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy committed Jun 20, 2008
1 parent 879245d commit 00ba4c0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions activesupport/lib/active_support/cache.rb
Expand Up @@ -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
Expand Down

0 comments on commit 00ba4c0

Please sign in to comment.