Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit b5b5558d2f5347707862b8eeb1816da7c02a1d90 1 parent 73c0b39
Jon Leighton jonleighton authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/associations/association.rb
4 activerecord/lib/active_record/associations/association.rb
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.