Permalink
Browse files

Fix a couple of tests in join_model_test.rb which were failing when t…

…he identity map is turned off
  • Loading branch information...
1 parent 056f05a commit af27262ec308784d2aaa59d48fd43bef5c2b9f89 @jonleighton jonleighton committed with tenderlove Mar 4, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/associations/association.rb
@@ -191,8 +191,8 @@ def construct_owner_attributes(reflection = reflection)
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

0 comments on commit af27262

Please sign in to comment.