module ActiveModel::Dirty

def init_attributes(other) # :nodoc:

:nodoc:
def init_attributes(other) # :nodoc:
  attrs = super
  if other.persisted? && self.class.respond_to?(:_default_attributes)
    self.class._default_attributes.map do |attr|
      attr.with_value_from_user(attrs.fetch_value(attr.name))
    end
  else
    attrs
  end
end