diff options
author | Angelo capilleri <capilleri@yahoo.com> | 2013-01-02 15:57:01 +0100 |
---|---|---|
committer | Angelo capilleri <capilleri@yahoo.com> | 2013-01-02 15:57:01 +0100 |
commit | 0a9172f1908d26d013a851b8be6fe785c596b74f (patch) | |
tree | c503d1afcdd98d638e182154cb114f3678a4cde9 /activerecord/lib/active_record/associations | |
parent | e443ac03a45e9444a688fcf840edd06aa361e9b0 (diff) | |
download | rails-0a9172f1908d26d013a851b8be6fe785c596b74f.tar.gz rails-0a9172f1908d26d013a851b8be6fe785c596b74f.tar.bz2 rails-0a9172f1908d26d013a851b8be6fe785c596b74f.zip |
refactoring to_sym of Symbol in preload
Diffstat (limited to 'activerecord/lib/active_record/associations')
-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" |