Skip to content

Commit

Permalink
Fix a couple of tests in join_model_test.rb which were failing when t…
Browse files Browse the repository at this point in the history
…he identity map is turned off
  • Loading branch information
jonleighton committed Mar 4, 2011
1 parent 73c0b39 commit b5b5558
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions activerecord/lib/active_record/associations/association.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b5b5558

Please sign in to comment.