diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2008-08-28 17:00:18 +0100 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-08-28 12:07:15 -0700 |
commit | db22c89543f45d7f27847003af949afa21cb6fa1 (patch) | |
tree | ed7d27eecfca62a9147577a26402e02d5600b1ee /activerecord/lib/active_record/calculations.rb | |
parent | 44af2efa2c7391681968c827ca47201a0a02e974 (diff) | |
download | rails-db22c89543f45d7f27847003af949afa21cb6fa1.tar.gz rails-db22c89543f45d7f27847003af949afa21cb6fa1.tar.bz2 rails-db22c89543f45d7f27847003af949afa21cb6fa1.zip |
Merge scoped :joins together instead of overwriting them. May expose scoping bugs in your code!
[#501 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'activerecord/lib/active_record/calculations.rb')
-rw-r--r-- | activerecord/lib/active_record/calculations.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/calculations.rb b/activerecord/lib/active_record/calculations.rb index 08306f361a..0325a8f8ca 100644 --- a/activerecord/lib/active_record/calculations.rb +++ b/activerecord/lib/active_record/calculations.rb @@ -188,7 +188,7 @@ module ActiveRecord end joins = "" - add_joins!(joins, options, scope) + add_joins!(joins, options[:joins], scope) if merged_includes.any? join_dependency = ActiveRecord::Associations::ClassMethods::JoinDependency.new(self, merged_includes, joins) |