aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations
diff options
context:
space:
mode:
authorNat Budin <nbudin@patientslikeme.com>2014-06-17 10:11:22 -0700
committerNat Budin <nbudin@patientslikeme.com>2014-06-17 10:15:04 -0700
commit30b76e5575c57056361741ebbede972f8ef477de (patch)
treeb6c0b24bc6e1242ca8170f46c8223d1537171ebd /activerecord/lib/active_record/associations
parent0c2fbc509545612908dd7bbdde3221518a2ec0e1 (diff)
downloadrails-30b76e5575c57056361741ebbede972f8ef477de.tar.gz
rails-30b76e5575c57056361741ebbede972f8ef477de.tar.bz2
rails-30b76e5575c57056361741ebbede972f8ef477de.zip
Don't include inheritance column in the through_scope_attributes
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r--activerecord/lib/active_record/associations/has_many_through_association.rb2
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 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)