You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you're amenable to that, I'd be happy to look into implementing the if/unless functionality (proposal: implementing the same API/semantics as ActiveRecord Callbacks), relevant specs, and interplay with the existing column_name. If not, no worries.
The text was updated successfully, but these errors were encountered:
tatethurston
changed the title
Adding :if / :unless with predicate method symbol for conditional counter caches
Adding :if / :unless for conditional counter caches
Feb 14, 2024
👋 Hey thanks for the great gem.
I'd like to propose supporting a conditional API similar to ActiveRecord's Callbacks.
Today, a conditional counter cache is implemented as follows:
I would like to propose the following shorthand:
If you're amenable to that, I'd be happy to look into implementing the if/unless functionality (proposal: implementing the same API/semantics as ActiveRecord Callbacks), relevant specs, and interplay with the existing
column_name
. If not, no worries.The text was updated successfully, but these errors were encountered: