diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-14 14:49:33 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-14 14:49:33 -0800 |
commit | 6212ecaa0be6c0f035d9be26e8693bd1f09fdfb6 (patch) | |
tree | c0f6d23682db2cd1b8ad49799c3ec1a801faa883 | |
parent | fdabb8fe176921d65b0e056d6f41ed9a63650945 (diff) | |
download | rails-6212ecaa0be6c0f035d9be26e8693bd1f09fdfb6.tar.gz rails-6212ecaa0be6c0f035d9be26e8693bd1f09fdfb6.tar.bz2 rails-6212ecaa0be6c0f035d9be26e8693bd1f09fdfb6.zip |
just copy the joins to the list
-rw-r--r-- | activerecord/lib/active_record/associations/has_many_through_association.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/has_many_through_association.rb b/activerecord/lib/active_record/associations/has_many_through_association.rb index d0c8af1801..6ad51e2fb4 100644 --- a/activerecord/lib/active_record/associations/has_many_through_association.rb +++ b/activerecord/lib/active_record/associations/has_many_through_association.rb @@ -54,7 +54,7 @@ module ActiveRecord end def construct_find_options!(options) - options[:joins] = construct_joins(options[:joins]) + options[:joins] = [construct_joins] + Array.wrap(options[:joins]) options[:include] = @reflection.source_reflection.options[:include] if options[:include].nil? && @reflection.source_reflection.options[:include] end |