diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-05-11 12:01:08 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-05-11 12:20:54 -0700 |
commit | ddbeb15a5e7e0c3c5f316ccf65b557bc5311a6c4 (patch) | |
tree | 96af79cc6a1fbf6be739102bd2afeec1f2df7ef6 /activerecord/lib | |
parent | e1854e0b199fba352ddcaa58a3af168e8cc70e3a (diff) | |
download | rails-ddbeb15a5e7e0c3c5f316ccf65b557bc5311a6c4.tar.gz rails-ddbeb15a5e7e0c3c5f316ccf65b557bc5311a6c4.tar.bz2 rails-ddbeb15a5e7e0c3c5f316ccf65b557bc5311a6c4.zip |
Revert "Fixed bug with polymorphic has_one :as pointing to an STI record"
[#2594 state:open]
This reverts commit 99c103be1165da9c8299bc0977188ecf167e06a5.
Diffstat (limited to 'activerecord/lib')
-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 4908005d2e..b72b84343b 100644 --- a/activerecord/lib/active_record/associations/has_one_association.rb +++ b/activerecord/lib/active_record/associations/has_one_association.rb @@ -90,7 +90,7 @@ module ActiveRecord when @reflection.options[:as] @finder_sql = "#{@reflection.quoted_table_name}.#{@reflection.options[:as]}_id = #{owner_quoted_id} AND " + - "#{@reflection.quoted_table_name}.#{@reflection.options[:as]}_type = #{@owner.class.quote_value(@owner.class.name.to_s)}" + "#{@reflection.quoted_table_name}.#{@reflection.options[:as]}_type = #{@owner.class.quote_value(@owner.class.base_class.name.to_s)}" else @finder_sql = "#{@reflection.quoted_table_name}.#{@reflection.primary_key_name} = #{owner_quoted_id}" end |