What will you do if you have to in/decrement counter cache column and get it actual value via single query?. Learn how to hack ActiveRecord to do this in easy and pretty cool way.
http://jetrockets.pro/blog/rails-increment-counter-cache-and-return-value
Top comments (4)
Hi Igor, do you consider to create simple gem and make the common patch ?
Done: github.com/jetrockets/activerecord...
I will update description and add specs later.
Sure, give me a couple of days.