Pulling the trigger: How to update counter caches in your Rails app without Active Record callbacks
In this article, we experiment with triggers as a tool for keeping aggregated data consistent when using Active Record and your favorite SQL database. Instead of using sophisticated tools such as ElasticSearch for filtering and searching, we will demonstrate a simple approach that achieves the same result with some out-of-the-box database features. As a bonus, learn how to avoid nasty race conditions!.
Pulling the trigger: How to update counter caches in your Rails app without Active Record callbacks #ruby #rails #rubyonrails #bosnia #programming #tutorials #rubydeveloper #railsdeveloper