Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | fixes #21815 | Maarten Jacobs | 2015-10-16 | 1 | -2/+2 |
| | | | | | | | | | | | | | | | 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 | ||||
* | [ci skip] Change 'an URL' to 'a URL' as URL doesn't have a vowel sound | tanmay3011 | 2015-10-06 | 1 | -1/+1 |
| | |||||
* | D HH => D H H | Akira Matsuda | 2015-09-18 | 1 | -1/+1 |
| | |||||
* | Use #model_name on instances instead of classes | Amiel Martin | 2014-06-24 | 1 | -4/+4 |
| | | | | | | This allows rails code to be more confdent when asking for a model name, instead of having to ask for the class. Rails core discussion here: https://groups.google.com/forum/#!topic/rubyonrails-core/ThSaXw9y1F8 | ||||
* | Fix to_param when attribute has multibyte character | rono23 | 2013-12-19 | 1 | -2/+4 |
| | |||||
* | explain how `to_param` wil truncate long values. [ci skip] refs #12900. | Yves Senn | 2013-11-15 | 1 | -0/+3 |
| | |||||
* | added one test case and example for ActiveRecord::Base.to_param method | Kuldeep Aggarwal | 2013-11-15 | 1 | -0/+4 |
| | |||||
* | Addendum to #12891 | Javan Makhmali | 2013-11-14 | 1 | -6/+10 |
| | | | | | | * Fix incorrectly named tests * Restore Object#to_param behavior * Ensure param is derived from a squished and truncated string | ||||
* | Add AR::Base.to_param for convenient "pretty" URLs derived from a model's ↵ | Javan Makhmali | 2013-11-14 | 1 | -0/+31 |
| | | | | attribute or method. | ||||
* | Refactor logic to grab the max time of the list of timestamp names in #cache_key | Carlos Antonio da Silva | 2013-11-04 | 1 | -2/+2 |
| | | | | | Reuse the already existing logic used for grabbing this information from the updated columns. | ||||
* | Respect cache timestamp format when giving timestamps to #cache_key | Carlos Antonio da Silva | 2013-11-04 | 1 | -1/+2 |
| | |||||
* | :scissors: [ci skip] | Carlos Antonio da Silva | 2013-11-04 | 1 | -2/+2 |
| | |||||
* | Extend ActiveRecord::Base#cache_key to take an optional list of timestamp ↵ | David Heinemeier Hansson | 2013-11-02 | 1 | -1/+9 |
| | | | | attributes of which the highest will be used. | ||||
* | Prefer find_by over dynamic finders in rdoc | Sam Ruby | 2013-04-02 | 1 | -2/+2 |
| | |||||
* | cache_key consults updated_on timestamp if present | Brendon Murphy | 2013-02-26 | 1 | -1/+1 |
| | | | | | - Extract max timestamp retrieval for cache_key - Update changelog for cache_key changes | ||||
* | revises the documentation of AR::Base.cache_timestamp_format [ci skip] | Xavier Noria | 2013-02-20 | 1 | -2/+4 |
| | |||||
* | Revert "Merge pull request #8989 from robertomiranda/use-rails-4-find-by" | Guillermo Iguaran | 2013-01-18 | 1 | -2/+2 |
| | | | | | This reverts commit 637a7d9d357a0f3f725b0548282ca8c5e7d4af4a, reversing changes made to 5937bd02dee112646469848d7fe8a8bfcef5b4c1. | ||||
* | User Rails 4 find_by | robertomiranda | 2013-01-18 | 1 | -2/+2 |
| | |||||
* | Allow users to choose the timestamp format in the cache key | Rafael Mendonça França | 2012-12-10 | 1 | -1/+12 |
| | | | | | | | This can be done using the class attribute cache_timestamp_format Conflicts: railties/guides/source/configuring.textile | ||||
* | Cleans and removes 'Examples' tag [ci skip] | Alvaro Pereyra | 2012-12-01 | 1 | -2/+0 |
| | |||||
* | Increase `AR#cache_key` precision to nanoseconds | Jamie Gaskins | 2012-05-19 | 1 | -1/+1 |
| | |||||
* | Split out most of the AR::Base code into separate modules :cake: | Jon Leighton | 2011-12-15 | 1 | -0/+49 |