aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2006-12-19 03:10:39 +0000
committerRick Olson <technoweenie@gmail.com>2006-12-19 03:10:39 +0000
commit41466a4c83e3e590b580d5d2cbc5869e601e7599 (patch)
tree2bb9c1b4274a3efa6f599f36caf2a63971765591 /activerecord/lib/active_record
parentd68f559640fcfa41174f544c38c9ac4aff216a26 (diff)
downloadrails-41466a4c83e3e590b580d5d2cbc5869e601e7599.tar.gz
rails-41466a4c83e3e590b580d5d2cbc5869e601e7599.tar.bz2
rails-41466a4c83e3e590b580d5d2cbc5869e601e7599.zip
fix faulty inheritance tests and that eager loading grabs the wrong inheritance column when the class of your association is an STI subclass. Closes #6859 [protocool]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5744 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record')
-rwxr-xr-xactiverecord/lib/active_record/associations.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index 5c1e796cfd..05eaf7b458 100755
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -1569,7 +1569,7 @@ module ActiveRecord
end || ''
join << %(AND %s.%s = %s ) % [
aliased_table_name,
- reflection.active_record.connection.quote_column_name(reflection.active_record.inheritance_column),
+ reflection.active_record.connection.quote_column_name(klass.inheritance_column),
klass.quote_value(klass.name.demodulize)] unless klass.descends_from_active_record?
[through_reflection, reflection].each do |ref|