diff options
Diffstat (limited to 'activerecord/lib/active_record/associations/preloader.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/preloader.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/preloader.rb b/activerecord/lib/active_record/associations/preloader.rb index 0848e7afb3..82bf426b22 100644 --- a/activerecord/lib/active_record/associations/preloader.rb +++ b/activerecord/lib/active_record/associations/preloader.rb @@ -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" |