diff options
author | Jon Leighton <j@jonathanleighton.com> | 2013-03-22 07:14:17 -0700 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2013-03-22 07:14:17 -0700 |
commit | ae2baab1aa278c065dc742a3ffe65c65a7b87dc9 (patch) | |
tree | 6a6fd983c2590c53661d8e0f9e5612968ba28659 /activerecord/lib/active_record/associations/preloader/through_association.rb | |
parent | 69599b63de927091faf1d804b6457f65014080d6 (diff) | |
parent | c8edd4fda45bbc7c99beaaf2d53f4de59c3fac54 (diff) | |
download | rails-ae2baab1aa278c065dc742a3ffe65c65a7b87dc9.tar.gz rails-ae2baab1aa278c065dc742a3ffe65c65a7b87dc9.tar.bz2 rails-ae2baab1aa278c065dc742a3ffe65c65a7b87dc9.zip |
Merge pull request #9870 from senny/9806_eager_loading_regression
do not reset associations when preloading twice.
Diffstat (limited to 'activerecord/lib/active_record/associations/preloader/through_association.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/preloader/through_association.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/preloader/through_association.rb b/activerecord/lib/active_record/associations/preloader/through_association.rb index 4cb7b56b57..e052b00403 100644 --- a/activerecord/lib/active_record/associations/preloader/through_association.rb +++ b/activerecord/lib/active_record/associations/preloader/through_association.rb @@ -56,8 +56,7 @@ module ActiveRecord through_options[:include] = options[:include] || options[:source] through_options[:conditions] = options[:conditions] end - - through_options[:order] = options[:order] + through_options[:order] = options[:order] if options.has_key?(:order) end through_options |