From dbdaf75777d4cc16842160747ae8e0002fe271c3 Mon Sep 17 00:00:00 2001
From: Aaron Patterson <aaron.patterson@gmail.com>
Date: Tue, 16 Jul 2013 11:37:53 -0700
Subject: just push on to the scope chain items. Oops! (thanks
 @carlosantoniodasilva)

---
 .../lib/active_record/associations/join_dependency/join_association.rb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'activerecord/lib/active_record/associations')

diff --git a/activerecord/lib/active_record/associations/join_dependency/join_association.rb b/activerecord/lib/active_record/associations/join_dependency/join_association.rb
index 97956ea3a1..06b70c050e 100644
--- a/activerecord/lib/active_record/associations/join_dependency/join_association.rb
+++ b/activerecord/lib/active_record/associations/join_dependency/join_association.rb
@@ -106,10 +106,9 @@ module ActiveRecord
             end
 
             if reflection.type
-              scope_chain_items.concat [
+              scope_chain_items <<
                 ActiveRecord::Relation.new(reflection.klass, table)
                   .where(reflection.type => foreign_klass.base_class.name)
-              ]
             end
 
             scope_chain_items.concat [reflection.klass.send(:build_default_scope)].compact
-- 
cgit v1.2.3