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:
parent
e443ac03a4
commit
0a9172f190
1 changed files with 3 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue