diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-03-04 21:21:34 +0000 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-03-04 14:49:19 -0800 |
commit | af27262ec308784d2aaa59d48fd43bef5c2b9f89 (patch) | |
tree | dbd37a5b7092d50de2a93c55fd0723cc778659bf | |
parent | 056f05adcd030634dc6a6e3054f25d80b7fd4445 (diff) | |
download | rails-af27262ec308784d2aaa59d48fd43bef5c2b9f89.tar.gz rails-af27262ec308784d2aaa59d48fd43bef5c2b9f89.tar.bz2 rails-af27262ec308784d2aaa59d48fd43bef5c2b9f89.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 |