VIEW MORE ARTICLES
Rinas Writes

January 26, 2022

TIL about using counter_cache in rails to save association's count in parent model
I had used counter_cache in the past but still had to look it up :D

Here is the SO answer that helped: https://stackoverflow.com/a/16996960/3098242

using counter_cache in rails to save association's count in parent model