mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
commit
d17e44edde
1 changed files with 0 additions and 6 deletions
|
@ -58,8 +58,6 @@ module ActiveRecord
|
|||
@changed_attributes.delete(attr) unless _field_changed?(attr, old, value)
|
||||
else
|
||||
old = clone_attribute_value(:read_attribute, attr)
|
||||
# Save Time objects as TimeWithZone if time_zone_aware_attributes == true
|
||||
old = old.in_time_zone if clone_with_time_zone_conversion_attribute?(attr, old)
|
||||
@changed_attributes[attr] = old if _field_changed?(attr, old, value)
|
||||
end
|
||||
|
||||
|
@ -92,10 +90,6 @@ module ActiveRecord
|
|||
|
||||
old != value
|
||||
end
|
||||
|
||||
def clone_with_time_zone_conversion_attribute?(attr, old)
|
||||
old.class.name == "Time" && time_zone_aware_attributes && !self.skip_time_zone_conversion_for_attributes.include?(attr.to_sym)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue