mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
true#to_param => true, so be sure to #to_s expanded cache keys
This commit is contained in:
parent
879245de1c
commit
00ba4c0cf3
1 changed files with 9 additions and 9 deletions
|
@ -25,15 +25,15 @@ module ActiveSupport
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue