1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test
Lilibeth De La Cruz bc982cbcb3 Fix handling of dirty time zone aware attributes
Previously, when `time_zone_aware_attributes` were enabled, after
changing a datetime or timestamp attribute and then changing it back
to the original value, `changed_attributes` still tracked the
attribute as changed. This caused `[attribute]_changed?` and
`changed?` methods to return true incorrectly.

Example:

    in_time_zone 'Paris' do
      order = Order.new
      original_time = Time.local(2012, 10, 10)
      order.shipped_at = original_time
      order.save
      order.changed? # => false

      # changing value
      order.shipped_at = Time.local(2013, 1, 1)
      order.changed? # => true

      # reverting to original value
      order.shipped_at = original_time
      order.changed? # => false, used to return true
    end
2013-01-26 16:57:33 +00:00
..
active_record/connection_adapters Ensure disconnecting or reconnecting resets the transaction state 2012-09-15 00:03:04 +01:00
assets
cases Fix handling of dirty time zone aware attributes 2013-01-26 16:57:33 +00:00
fixtures Rename "Fixtures" class to "FixtureSet" 2012-10-07 19:15:58 +02:00
migrations recognize migrations, in folders containing numbers and 'rb'. 2012-12-13 09:08:32 +01:00
models Describing the reason for defining BlankTopic#blank? which will never be called 2013-01-24 22:07:43 +09:00
schema Fix PostgreSQL tests on Travis 2013-01-24 00:16:01 +00:00
support Revert "Fix annoy warning, when executing testcase." 2012-11-30 12:07:55 +04:00
.gitignore
config.example.yml
config.rb