From e2b226e21b71e6be6cf8fff62707e3fd747ad4c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Villeneuve?= Date: Sat, 9 Dec 2023 18:35:00 +0100 Subject: [PATCH] Update documentation --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 5294a84..2ca16e0 100644 --- a/README.md +++ b/README.md @@ -155,6 +155,7 @@ This method is used to define a counter. | `if_async` | lambda, optional | Boolean. Similar to `if`, but executed asynchronously. Allows to not slow down `INSERT` or `UPDATE` statements. Useful if your `if` calls complex model relationships | | `decrement_if` | lambda, optional | Boolean. If it returns true, then the counter will be decremented instead of incremented | | `uniq_by` | lambda, optional | Won't count the same value twice. By default it is uniq on the `id`. Example use case: if a `Post` is written by an `author_id`, you could set `-> { post.author_id}` to know how many authors wrote an article this month | +| `decrement_on_destroy` | Boolean, optional | Default is true. The counter will be decremented when the model instance is destroyed. | ### aggregate