1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Everything responds to #to_param

This commit is contained in:
Jeremy Kemper 2008-06-21 04:19:30 -07:00
parent 8d24a029df
commit 9a0e443719

View file

@ -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