Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Do not add record to identity map if the record doesn't have values f…

…or all the columns, so we don't get 'MissingAttributeError' later when trying to access other fields of the same record.
  • Loading branch information...
commit a00a42dc013602c74fc6aca89fc9a69fe29c05b5 1 parent 488ea89
@arturopie arturopie authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  activerecord/lib/active_record/identity_map.rb
View
2  activerecord/lib/active_record/identity_map.rb
@@ -90,7 +90,7 @@ def get(klass, primary_key)
end
def add(record)
- repository[record.class.symbolized_sti_name][record.id] = record
+ repository[record.class.symbolized_sti_name][record.id] = record if record.class.column_names - record.attribute_names == []
end
def remove(record)
Please sign in to comment.
Something went wrong with that request. Please try again.