DEPRECATION WARNING: Time#to_s(:number) is deprecated. Please use Time#to_fs(:number) instead

This commit is contained in:
Daniel O'Connor
2022-11-06 16:29:26 +10:30
parent 24633df6a9
commit ded1e66d53

View File

@@ -24,7 +24,7 @@ module ApplicationHelper
# Produces a cache key for uniquely identifying cached fragments.
def cache_key_for(klass, identifier = "all")
count = klass.count
max_updated_at = klass.maximum(:updated_at).try(:utc).try(:to_s, :number)
max_updated_at = klass.maximum(:updated_at).try(:utc).try(:to_fs, :number)
"#{klass.name.downcase.pluralize}/#{identifier}-#{count}-#{max_updated_at}"
end