Permalink
Browse files

remove unnecessary code

it was added in 36129f2
but isn't useful anymore as corresponding tests pass without it
  • Loading branch information...
1 parent 2adf78d commit cb400b0c654e62c99dca1faf052c9389c58d692c @lest lest committed Feb 27, 2012
Showing with 0 additions and 6 deletions.
  1. +0 −6 activerecord/lib/active_record/attribute_methods/dirty.rb
@@ -58,8 +58,6 @@ def write_attribute(attr, value)
@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 @@ def _field_changed?(attr, old, value)
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

0 comments on commit cb400b0

Please sign in to comment.