diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-19 18:56:00 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-19 18:56:00 -0300 |
commit | 03035d69e14032a589e9653e3145237b8a9a09be (patch) | |
tree | a20b809cd5b17c706709a51594c0ab1480503c6c /activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb | |
parent | 09cc922ed31bf699b26fafe4822fc7048b821825 (diff) | |
parent | d0f8c46e1962b28d77209f367f12c2d2c77f4b12 (diff) | |
download | rails-03035d69e14032a589e9653e3145237b8a9a09be.tar.gz rails-03035d69e14032a589e9653e3145237b8a9a09be.tar.bz2 rails-03035d69e14032a589e9653e3145237b8a9a09be.zip |
Merge pull request #15184 from sgrif/sg-remove-timestamp-type
Remove :timestamp column type
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb | 4 |
1 files changed, 2 insertions, 2 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 f168282ea3..dfebb2cf56 100644 --- a/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb +++ b/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb @@ -28,7 +28,7 @@ module ActiveRecord module ClassMethods protected - # Defined for all +datetime+ and +timestamp+ attributes when +time_zone_aware_attributes+ are enabled. + # Defined for all +datetime+ attributes when +time_zone_aware_attributes+ are enabled. # This enhanced write method will automatically convert the time passed to it to the zone stored in Time.zone. def define_method_attribute=(attr_name) if create_time_zone_conversion_attribute?(attr_name, columns_hash[attr_name]) @@ -51,7 +51,7 @@ module ActiveRecord def create_time_zone_conversion_attribute?(name, column) time_zone_aware_attributes && !self.skip_time_zone_conversion_for_attributes.include?(name.to_sym) && - (:datetime == column.type || :timestamp == column.type) + (:datetime == column.type) end end end |