diff options
author | Rick Olson <technoweenie@gmail.com> | 2006-12-19 03:10:39 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2006-12-19 03:10:39 +0000 |
commit | 41466a4c83e3e590b580d5d2cbc5869e601e7599 (patch) | |
tree | 2bb9c1b4274a3efa6f599f36caf2a63971765591 /activerecord/lib/active_record | |
parent | d68f559640fcfa41174f544c38c9ac4aff216a26 (diff) | |
download | rails-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-x | activerecord/lib/active_record/associations.rb | 2 |
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| |