1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

8 commits

Author SHA1 Message Date
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590, reversing
changes made to afb66a5a59.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
David Heinemeier Hansson
aa8749eb52 Add cache_key_with_version and use it in ActiveSupport::Cache.expand_cache_key
This retains the existing behavior of
ActiveSupport::Cache.expand_cache_key (as used by etaging) where the
cache key includes the version.
2017-05-19 14:09:09 +02:00
David Heinemeier Hansson
75fa8dd309 Use recyclable cache keys (#29092) 2017-05-18 18:12:32 +02:00
Ryuta Kamizono
a315846923 Remove duplicated "test" prefix 2017-04-07 08:40:52 +09:00
Maarten Jacobs
86d2924a11 fixes #21815
The default timestamp used for AR is `updated_at` in nanoseconds! (:nsec) This causes issues on any machine that runs an OS that supports nanoseconds timestamps, i.e. not-OS X, where the cache_key of the record persisted in the database (milliseconds precision) is out-of-sync with the cache_key in the ruby VM.

This commit adds:

A test that shows the issue, it can be found in the separate file `cache_key_test.rb`, because
- model couldn't be defined inline
- transactional testing needed to be turned off to get it to pass the MySQL tests
This seemed cleaner than putting it in an existing testcase file.

It adds :usec as a dateformat that calculates datetime in microseconds

It sets precision of cache_key to :usec instead of :nsec, as no db supports nsec precision on timestamps
2015-10-16 15:09:45 +02:00
Rafael Mendonça França
3142bf51ee Make sure the tests pass in the case closer to described in #8195
Conflicts:
	activerecord/test/models/bulb.rb
	activerecord/test/schema/schema.rb
2012-12-10 17:35:16 -03:00
jacobstr
567cdd1f29 Added regression test for #8195. 2012-12-10 17:35:16 -03:00