diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2010-01-02 18:39:36 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-01-02 18:39:36 -0800 |
commit | 8571aa613f1707401b0fe54c0fa1687604c48e0a (patch) | |
tree | 80a70d90210a3e4fdabcb2176ce60962fa0de6a6 /activerecord/lib | |
parent | c3d19eb950578ff4a20692bd1b20ee074789818e (diff) | |
download | rails-8571aa613f1707401b0fe54c0fa1687604c48e0a.tar.gz rails-8571aa613f1707401b0fe54c0fa1687604c48e0a.tar.bz2 rails-8571aa613f1707401b0fe54c0fa1687604c48e0a.zip |
Revert "Remove optional join_dependency argument as Relation always supplies it"
This reverts commit 8e57deed8b4efad6ea1c551f415b74596111f890.
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-x | activerecord/lib/active_record/associations.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index d74b21b690..a2cb41f9ab 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -1465,7 +1465,8 @@ module ActiveRecord 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 |