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

18 commits

Author SHA1 Message Date
rono23
ee738f9604 Fix to_param when attribute has multibyte character 2013-12-19 05:29:16 +09:00
Yves Senn
e7c90e646b explain how to_param wil truncate long values. [ci skip] refs #12900. 2013-11-15 16:11:26 +01:00
Kuldeep Aggarwal
a5d588875f added one test case and example for ActiveRecord::Base.to_param method 2013-11-15 20:05:17 +05:30
Javan Makhmali
633100b9e5 Addendum to #12891
* Fix incorrectly named tests
* Restore Object#to_param behavior
* Ensure param is derived from a squished and truncated string
2013-11-14 15:35:53 -05:00
Javan Makhmali
547999df25 Add AR::Base.to_param for convenient "pretty" URLs derived from a model's attribute or method. 2013-11-14 13:38:08 -05:00
Carlos Antonio da Silva
d0d7555e87 Refactor logic to grab the max time of the list of timestamp names in #cache_key
Reuse the already existing logic used for grabbing this information from
the updated columns.
2013-11-04 13:14:07 -02:00
Carlos Antonio da Silva
92c6305954 Respect cache timestamp format when giving timestamps to #cache_key 2013-11-04 13:11:51 -02:00
Carlos Antonio da Silva
91d72fe652 ✂️ [ci skip] 2013-11-04 13:01:57 -02:00
David Heinemeier Hansson
e94e97ca79 Extend ActiveRecord::Base#cache_key to take an optional list of timestamp attributes of which the highest will be used. 2013-11-02 16:05:19 -07:00
Sam Ruby
04cda1848c Prefer find_by over dynamic finders in rdoc 2013-04-02 15:09:15 -04:00
Brendon Murphy
1dc98c143c cache_key consults updated_on timestamp if present
- Extract max timestamp retrieval for cache_key
- Update changelog for cache_key changes
2013-02-26 00:04:05 -08:00
Xavier Noria
1b776b9470 revises the documentation of AR::Base.cache_timestamp_format [ci skip] 2013-02-20 18:08:55 +01:00
Guillermo Iguaran
8aebe30ef4 Revert "Merge pull request #8989 from robertomiranda/use-rails-4-find-by"
This reverts commit 637a7d9d35, reversing
changes made to 5937bd02de.
2013-01-18 09:15:19 -05:00
robertomiranda
7baecc4802 User Rails 4 find_by 2013-01-18 07:56:05 -05:00
Rafael Mendonça França
9cce1ea2fd Allow users to choose the timestamp format in the cache key
This can be done using the class attribute cache_timestamp_format

Conflicts:
	railties/guides/source/configuring.textile
2012-12-10 17:48:26 -03:00
Alvaro Pereyra
b1e2d7b968 Cleans and removes 'Examples' tag [ci skip] 2012-12-01 15:35:04 -05:00
Jamie Gaskins
900dbc54f1 Increase AR#cache_key precision to nanoseconds 2012-05-19 08:20:08 +08:00
Jon Leighton
ceb33f8493 Split out most of the AR::Base code into separate modules 🍰 2011-12-15 20:45:37 +00:00