diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-03-04 21:21:34 +0000 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-03-04 22:35:46 +0000 |
commit | b5b5558d2f5347707862b8eeb1816da7c02a1d90 (patch) | |
tree | 0c0695df0a1937eb4da3b65089ab3fd325acd4ff | |
parent | 73c0b390b3a1ea9487c3f667352463a90af6dd71 (diff) | |
download | rails-b5b5558d2f5347707862b8eeb1816da7c02a1d90.tar.gz rails-b5b5558d2f5347707862b8eeb1816da7c02a1d90.tar.bz2 rails-b5b5558d2f5347707862b8eeb1816da7c02a1d90.zip |
Fix a couple of tests in join_model_test.rb which were failing when the identity map is turned off
-rw-r--r-- | activerecord/lib/active_record/associations/association.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/association.rb b/activerecord/lib/active_record/associations/association.rb index 86904ea2bc..67752da2a5 100644 --- a/activerecord/lib/active_record/associations/association.rb +++ b/activerecord/lib/active_record/associations/association.rb @@ -191,8 +191,8 @@ module ActiveRecord else attributes[reflection.foreign_key] = owner[reflection.active_record_primary_key] - if options[:as] - attributes["#{options[:as]}_type"] = owner.class.base_class.name + if reflection.options[:as] + attributes[reflection.type] = owner.class.base_class.name end end attributes |