diff options
author | Sergey Nartimov <just.lest@gmail.com> | 2012-02-28 00:29:01 +0300 |
---|---|---|
committer | Sergey Nartimov <just.lest@gmail.com> | 2012-02-28 00:33:50 +0300 |
commit | ddb5d2f756d9d2655a07791a3b62832efd588474 (patch) | |
tree | 90058a9b00d8e829ae823f3a368ba1a4e3822af9 /activerecord/lib | |
parent | 2adf78d335dd55ef39559e9e209f1ce96c948095 (diff) | |
download | rails-ddb5d2f756d9d2655a07791a3b62832efd588474.tar.gz rails-ddb5d2f756d9d2655a07791a3b62832efd588474.tar.bz2 rails-ddb5d2f756d9d2655a07791a3b62832efd588474.zip |
force datetime attributes to be changed, fix GH #3965
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb b/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb index 20372c5c18..ac31b636db 100644 --- a/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb +++ b/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb @@ -58,6 +58,7 @@ module ActiveRecord end time = time.in_time_zone rescue nil if time write_attribute(:#{attr_name}, original_time) + #{attr_name}_will_change! @attributes_cache["#{attr_name}"] = time end EOV |