Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

porting 0665182 to master. Thanks Marcelo Giorgi

  • Loading branch information...
commit 9edaf10fee5184ad427d23b7a0ca17033db1f17a 1 parent c2c6f12
Aaron Patterson tenderlove authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  activerecord/lib/active_record/association_preload.rb
2  activerecord/lib/active_record/association_preload.rb
View
@@ -284,7 +284,7 @@ def preload_through_records(records, reflection, through_association)
end
else
options = {}
- options[:include] = reflection.options[:include] || reflection.options[:source] if reflection.options[:conditions]
+ options[:include] = reflection.options[:include] || reflection.options[:source] if reflection.options[:conditions] || reflection.options[:order]
options[:order] = reflection.options[:order]
options[:conditions] = reflection.options[:conditions]
records.first.class.preload_associations(records, through_association, options)
Please sign in to comment.
Something went wrong with that request. Please try again.