class ActiveModel::LazyAttributeHash
def assign_default_value(name)
def assign_default_value(name) type = additional_types.fetch(name, types[name]) value_present = true value = values.fetch(name) { value_present = false } if value_present delegate_hash[name] = Attribute.from_database(name, value, type) elsif types.key?(name) attr = default_attributes[name] if attr delegate_hash[name] = attr.dup else delegate_hash[name] = Attribute.uninitialized(name, type) end end end