Permalink
Browse files

Revert "Remove optional join_dependency argument as Relation always s…

…upplies it"

This reverts commit 8e57dee.
  • Loading branch information...
jeremy committed Jan 3, 2010
1 parent c3d19eb commit 8571aa613f1707401b0fe54c0fa1687604c48e0a
Showing with 2 additions and 1 deletion.
  1. +2 −1 activerecord/lib/active_record/associations.rb
@@ -1465,7 +1465,8 @@ def add_touch_callbacks(reflection, touch_attribute)
after_destroy(method_name)
end
- def find_with_associations(options = {}, join_dependency)
+ def find_with_associations(options = {}, join_dependency = nil)
+ join_dependency ||= JoinDependency.new(self, merge_includes(scope(:find, :include), options[:include]), options[:joins])
rows = select_all_rows(options, join_dependency)
join_dependency.instantiate(rows)
rescue ThrowResult

0 comments on commit 8571aa6

Please sign in to comment.