diff --git a/activemodel/lib/active_model/attribute.rb b/activemodel/lib/active_model/attribute.rb index 3561c5207e..193f44932f 100644 --- a/activemodel/lib/active_model/attribute.rb +++ b/activemodel/lib/active_model/attribute.rb @@ -175,19 +175,6 @@ module ActiveModel type.deserialize(value) end - def forgetting_assignment - # If this attribute was not persisted (with a `value_for_database` - # that might differ from `value_before_type_cast`) and `value` has not - # changed in place, we can simply dup this attribute to avoid - # deserialize / cast / serialize calls from computing the new - # attribute's `value_before_type_cast`. - if !defined?(@value_for_database) && !changed_in_place? - dup - else - super - end - end - private def _original_value_for_database value_before_type_cast