diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-16 14:19:14 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-16 14:28:19 -0800 |
commit | 05320e3788a1be19956e7caa822484b816e11366 (patch) | |
tree | f1c31aeb5868fbdfe4e8d053186aecd0036727f9 /activerecord/lib/active_record/associations/association_collection.rb | |
parent | 5f608fc7c4fa3ac793f1eb1b1f418033dfb13049 (diff) | |
download | rails-05320e3788a1be19956e7caa822484b816e11366.tar.gz rails-05320e3788a1be19956e7caa822484b816e11366.tar.bz2 rails-05320e3788a1be19956e7caa822484b816e11366.zip |
use unless instead of if !
Diffstat (limited to 'activerecord/lib/active_record/associations/association_collection.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/association_collection.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/association_collection.rb b/activerecord/lib/active_record/associations/association_collection.rb index 34247deb02..98507ad1d1 100644 --- a/activerecord/lib/active_record/associations/association_collection.rb +++ b/activerecord/lib/active_record/associations/association_collection.rb @@ -372,7 +372,7 @@ module ActiveRecord def load_target if @owner.persisted? || foreign_key_present begin - if !loaded? + unless loaded? if @target.is_a?(Array) && @target.any? @target = find_target.map do |f| i = @target.index(f) |