lib/active_remote/integration.rb in active_remote-6.0.3 vs lib/active_remote/integration.rb in active_remote-6.1.0

- old
+ new

@@ -61,10 +61,10 @@ # def cache_key case when new_record? then "#{model_name.cache_key}/new" - when ::ActiveRemote.config.default_cache_key_updated_at? && (timestamp = self[:updated_at]) then + 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) "#{model_name.cache_key}/#{send(primary_key)}-#{timestamp}" else "#{model_name.cache_key}/#{send(primary_key)}" end