Skip to content

Commit cb400b0

Browse files
committed
remove unnecessary code
it was added in 36129f2 but isn't useful anymore as corresponding tests pass without it
1 parent 2adf78d commit cb400b0

File tree

1 file changed

+0
-6
lines changed
  • activerecord/lib/active_record/attribute_methods

1 file changed

+0
-6
lines changed

activerecord/lib/active_record/attribute_methods/dirty.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ def write_attribute(attr, value)
5858
@changed_attributes.delete(attr) unless _field_changed?(attr, old, value)
5959
else
6060
old = clone_attribute_value(:read_attribute, attr)
61-
# Save Time objects as TimeWithZone if time_zone_aware_attributes == true
62-
old = old.in_time_zone if clone_with_time_zone_conversion_attribute?(attr, old)
6361
@changed_attributes[attr] = old if _field_changed?(attr, old, value)
6462
end
6563

@@ -92,10 +90,6 @@ def _field_changed?(attr, old, value)
9290

9391
old != value
9492
end
95-
96-
def clone_with_time_zone_conversion_attribute?(attr, old)
97-
old.class.name == "Time" && time_zone_aware_attributes && !self.skip_time_zone_conversion_for_attributes.include?(attr.to_sym)
98-
end
9993
end
10094
end
10195
end

0 commit comments

Comments
 (0)