lib/active_remote/integration.rb in active_remote-6.1.2 vs lib/active_remote/integration.rb in active_remote-7.0.0

- old
+ new

@@ -62,11 +62,11 @@ def cache_key case when new_record? then "#{model_name.cache_key}/new" when ::ActiveRemote.config.default_cache_key_updated_at? && (self.respond_to?(:[]) && timestamp = self["updated_at"]) then - timestamp = timestamp.utc.to_s(self.class.cache_timestamp_format) + timestamp = timestamp.utc.to_fs(self.class.cache_timestamp_format) "#{model_name.cache_key}/#{send(primary_key)}-#{timestamp}" else "#{model_name.cache_key}/#{send(primary_key)}" end end @@ -86,10 +86,10 @@ # # Note, this method will return nil if ActiveRecord::Base.cache_versioning is set to # +false+ (which it is by default until Rails 6.0). def cache_version if cache_versioning && (timestamp = try(:updated_at)) - timestamp.utc.to_s(:usec) + timestamp.utc.to_fs(:usec) end end module ClassMethods # Defines your model's +to_param+ method to generate "pretty" URLs