From 53c6a2da6169d976c0e9c58005d2d5c349701305 Mon Sep 17 00:00:00 2001 From: rpereira2 Date: Mon, 1 Apr 2019 23:07:28 +0530 Subject: Add argument to default reactive_cache_worker_finder - This second argument is a catch-all that will catch all extra arguments passed to the reactive_cache_worker_finder, so that it does not fail in situations where there are more than one argument being passed. Only the first argument will be used as id, all other arguments will be ignored. --- app/models/concerns/reactive_caching.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/concerns/reactive_caching.rb b/app/models/concerns/reactive_caching.rb index 5efcb94577b..55c51437b1d 100644 --- a/app/models/concerns/reactive_caching.rb +++ b/app/models/concerns/reactive_caching.rb @@ -94,7 +94,7 @@ module ReactiveCaching self.reactive_cache_refresh_interval = 1.minute self.reactive_cache_lifetime = 10.minutes - self.reactive_cache_worker_finder = ->(id) do + self.reactive_cache_worker_finder = ->(id, *_args) do find_by(primary_key => id) end -- cgit v1.2.1