diff options
author | Rick Olson <technoweenie@gmail.com> | 2006-03-16 02:46:01 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2006-03-16 02:46:01 +0000 |
commit | def746030c20697f2c4376515169eeda2f6332b4 (patch) | |
tree | 1569968114c0c728011b450ff10ac278914f60e8 /activerecord/lib/active_record/associations/has_one_association.rb | |
parent | 0859779d6f1cadfec12f1112c80382658466ab7d (diff) | |
download | rails-def746030c20697f2c4376515169eeda2f6332b4.tar.gz rails-def746030c20697f2c4376515169eeda2f6332b4.tar.bz2 rails-def746030c20697f2c4376515169eeda2f6332b4.zip |
Added Base.abstract_class? that marks which classes are not part of the Active Record hierarchy. closes #3704
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3882 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/associations/has_one_association.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/has_one_association.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/has_one_association.rb b/activerecord/lib/active_record/associations/has_one_association.rb index 65f584c6f9..e0d6f64b27 100644 --- a/activerecord/lib/active_record/associations/has_one_association.rb +++ b/activerecord/lib/active_record/associations/has_one_association.rb @@ -69,7 +69,7 @@ module ActiveRecord when @reflection.options[:as] @finder_sql = "#{@reflection.klass.table_name}.#{@reflection.options[:as]}_id = #{@owner.quoted_id} AND " + - "#{@reflection.klass.table_name}.#{@reflection.options[:as]}_type = '#{ActiveRecord::Base.send(:class_name_of_active_record_descendant, @owner.class).to_s}'" + "#{@reflection.klass.table_name}.#{@reflection.options[:as]}_type = #{@owner.class.quote @owner.class.base_class.name.to_s}" else @finder_sql = "#{@reflection.table_name}.#{@reflection.primary_key_name} = #{@owner.quoted_id}" end |