diff options
author | José Valim <jose.valim@gmail.com> | 2012-02-27 22:50:24 -0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-02-27 22:50:24 -0800 |
commit | d17e44edde24def1e90999abfc6a343a65196271 (patch) | |
tree | d96af8ceef4de865de581bcf92a04f7311ebce31 /activerecord/lib/active_record/attribute_methods | |
parent | acf7e86024fa8f7768f02a84688ae6e20c808c9c (diff) | |
parent | cb400b0c654e62c99dca1faf052c9389c58d692c (diff) | |
download | rails-d17e44edde24def1e90999abfc6a343a65196271.tar.gz rails-d17e44edde24def1e90999abfc6a343a65196271.tar.bz2 rails-d17e44edde24def1e90999abfc6a343a65196271.zip |
Merge pull request #5197 from lest/patch-4
remove unnecessary code
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods/dirty.rb | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/dirty.rb b/activerecord/lib/active_record/attribute_methods/dirty.rb index 433d508357..3a737e5b35 100644 --- a/activerecord/lib/active_record/attribute_methods/dirty.rb +++ b/activerecord/lib/active_record/attribute_methods/dirty.rb @@ -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 |