aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2011-07-14 11:14:27 -0700
committerSantiago Pastorino <santiago@wyeworks.com>2011-07-14 11:14:27 -0700
commit31ea0276a4f6059799ec031757caf2511d9c90c5 (patch)
tree659547297faaee900f1a625b95c605ed65ff901f /activerecord/lib/active_record
parentd632e927ec06f4aa0dfd6bba2d554ca9f460de55 (diff)
parentf13dea8a3463b753a69c22fc27648160c013fc3b (diff)
downloadrails-31ea0276a4f6059799ec031757caf2511d9c90c5.tar.gz
rails-31ea0276a4f6059799ec031757caf2511d9c90c5.tar.bz2
rails-31ea0276a4f6059799ec031757caf2511d9c90c5.zip
Merge pull request #2063 from elight/master
Patch for https://github.com/rails/rails/issues/2059
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/base.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index eb4a16ecf5..deff1c65ef 100644
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -1638,7 +1638,8 @@ MSG
when new_record?
"#{self.class.model_name.cache_key}/new"
when timestamp = self[:updated_at]
- "#{self.class.model_name.cache_key}/#{id}-#{timestamp.to_s(:number)}"
+ timestamp = timestamp.utc.to_s(:number)
+ "#{self.class.model_name.cache_key}/#{id}-#{timestamp}"
else
"#{self.class.model_name.cache_key}/#{id}"
end