diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2012-08-28 12:57:41 -0700 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2012-08-28 12:57:41 -0700 |
commit | 58d35f62110d4280818d49f6a76b3bdaa1ee217a (patch) | |
tree | 786f6d111464f7e499c0283be1267a2b091fcde1 /activerecord/lib/active_record/associations/preloader/association.rb | |
parent | 8efced68be645af03e0b49d3a12d85b8d1aaee7a (diff) | |
download | rails-58d35f62110d4280818d49f6a76b3bdaa1ee217a.tar.gz rails-58d35f62110d4280818d49f6a76b3bdaa1ee217a.tar.bz2 rails-58d35f62110d4280818d49f6a76b3bdaa1ee217a.zip |
Ensure association preloading properly merges default scope and association conditions
Conflicts:
activerecord/test/models/reader.rb
Diffstat (limited to 'activerecord/lib/active_record/associations/preloader/association.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/preloader/association.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/associations/preloader/association.rb b/activerecord/lib/active_record/associations/preloader/association.rb index 779f8164cc..85b1040049 100644 --- a/activerecord/lib/active_record/associations/preloader/association.rb +++ b/activerecord/lib/active_record/associations/preloader/association.rb @@ -117,9 +117,7 @@ module ActiveRecord conditions = klass.send(:instance_eval, &conditions) end - if conditions - klass.send(:sanitize_sql, conditions) - end + conditions end end end |