From 30b76e5575c57056361741ebbede972f8ef477de Mon Sep 17 00:00:00 2001 From: Nat Budin Date: Tue, 17 Jun 2014 10:11:22 -0700 Subject: Don't include inheritance column in the through_scope_attributes --- .../lib/active_record/associations/has_many_through_association.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record') 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 175019a72b..96466ac7c7 100644 --- a/activerecord/lib/active_record/associations/has_many_through_association.rb +++ b/activerecord/lib/active_record/associations/has_many_through_association.rb @@ -93,7 +93,7 @@ module ActiveRecord end def through_scope_attributes - scope.where_values_hash(through_association.reflection.name.to_s).except!(through_association.reflection.foreign_key) + scope.where_values_hash(through_association.reflection.name.to_s).except!(through_association.reflection.foreign_key, through_association.reflection.klass.inheritance_column) end def save_through_record(record) -- cgit v1.2.3