Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix ActiveRecord::Relation#cache_key for loaded empty collection | Prathamesh Sonpatki | 2016-01-16 | 1 | -1/+3 |
| | | | | | | | | | - Before this patch if we try to find cache_key of a loaded but empty collection it used to give error because of trying to call `updated_at` on `nil` value generated by `collection.max_by(×tamp_column).public_send(timestamp_column)`. - This commit fixes above error by checking if size is greater than zero or not. | ||||
* | Fix test failures caused by #20884 | Sean Griffin | 2015-08-01 | 1 | -1/+3 |
| | | | | | | | PostgreSQL is strict about the usage of `DISTINCT` and `ORDER BY`, which one of the tests demonstrated. The order clause is never going to be relevant in the query we're performing, so let's just remove it entirely. | ||||
* | Add #cache_key to ActiveRecord::Relation. | Alberto F. Capel | 2015-07-20 | 1 | -0/+29 |