| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
There were a few places where I missed a `create` vs `new`
before_type_cast check, and the semantics of `reload` became wrong.
|
|
|
|
|
|
| |
When I originally reviewed the #20317, I believe these changes were
present, but it appears that it was later updated so that they were
removed. Since Travis hadn't re-run the build, this slipped through.
|
|
|
|
| |
onwards.
|
|
|
|
|
| |
`Computer` class needs to be require
See #17217 for more details
|
|
|
|
|
| |
Ensure the child can actually be touched. The `Bulb` model has no
timestamp column, thus trying to touch it would return `nil`.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* Fix incorrectly named tests
* Restore Object#to_param behavior
* Ensure param is derived from a squished and truncated string
|
|
|
|
| |
attribute or method.
|
| |
|
|
|
|
| |
attributes of which the highest will be used.
|
| |
|
| |
|
|
|
|
|
|
|
| |
According to the doc of `AR::Base#to_param`(
https://github.com/rails/rails/blob/04cda1848cb847c2bdad0bfc12160dc8d554
7775/activerecord/lib/active_record/integration.rb#L18 ), it returns
`nil` if the record is not persisted.
|
|
`AR::Base#to_param` and `AR::Base#cache_key` is defined at
active_record/integration.rb, so tests for those methods should be at
integration_test.rb
|