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

refactoring to_sym of Symbol in preload

This commit is contained in:
Angelo capilleri 2013-01-02 15:57:01 +01:00
parent e443ac03a4
commit 0a9172f190

View file

@ -100,7 +100,9 @@ module ActiveRecord
case association
when Hash
preload_hash(association)
when String, Symbol
when Symbol
preload_one(association)
when String
preload_one(association.to_sym)
else
raise ArgumentError, "#{association.inspect} was not recognised for preload"