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 73c0b39 commit b5b5558d2f5347707862b8eeb1816da7c02a1d90 @jonleighton jonleighton committed 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 b5b5558

Please sign in to comment.