aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/integration.rb
diff options
context:
space:
mode:
authorBrendon Murphy <xternal1+github@gmail.com>2013-01-23 01:47:23 -0800
committerBrendon Murphy <xternal1+github@gmail.com>2013-02-26 00:04:05 -0800
commit1dc98c143c4bf84ccfb55b30c7d41b29b62d50cf (patch)
treef3d8f59817cca43e77d7564f4f3a37b95c73fc16 /activerecord/lib/active_record/integration.rb
parent92aa789ce1ee9d7a2220bb49d22288f292d05367 (diff)
downloadrails-1dc98c143c4bf84ccfb55b30c7d41b29b62d50cf.tar.gz
rails-1dc98c143c4bf84ccfb55b30c7d41b29b62d50cf.tar.bz2
rails-1dc98c143c4bf84ccfb55b30c7d41b29b62d50cf.zip
cache_key consults updated_on timestamp if present
- Extract max timestamp retrieval for cache_key - Update changelog for cache_key changes
Diffstat (limited to 'activerecord/lib/active_record/integration.rb')
-rw-r--r--activerecord/lib/active_record/integration.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/integration.rb b/activerecord/lib/active_record/integration.rb
index 32d35f0ec1..48c73d7781 100644
--- a/activerecord/lib/active_record/integration.rb
+++ b/activerecord/lib/active_record/integration.rb
@@ -49,7 +49,7 @@ module ActiveRecord
case
when new_record?
"#{self.class.model_name.cache_key}/new"
- when timestamp = self[:updated_at]
+ when timestamp = max_updated_column_timestamp
timestamp = timestamp.utc.to_s(cache_timestamp_format)
"#{self.class.model_name.cache_key}/#{id}-#{timestamp}"
else