1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix failing test

b63701e moved the assignment before the query, but we need to capture
our old id before assignment in case we are assigning the id.
This commit is contained in:
Sean Griffin 2018-10-30 14:03:11 -06:00
parent b63701e272
commit 3b2ea8b683

View file

@ -479,6 +479,7 @@ module ActiveRecord
verify_readonly_attribute(key.to_s)
end
id_in_database = self.id_in_database
attributes.each do |k, v|
write_attribute_without_type_cast(k, v)
end