Archive for the ‘counter_cache’ Category

Move to Rails 2.0.2

February 23rd, 2008 by Prateek Dayal View Comments

I finally moved Muziboo to rails 2.0.2 this weekend. The move went pretty smooth. The only gotcha for me was that counters used with conter_cacheĀ  are marked as readonly in rails 2.0.2 so you cannot use update_attributes to update them (in a migration or otherwise) The trick is to use Class.update_counters class method … Other [...]

Popularity: 7% [?]

counter_cache gotcha in activerecord!

August 19th, 2007 by Prateek Dayal View Comments

If you are using counter_cache, you must watch out for this one. I am not sure if this has been fixed in the recent version, but the version that I am using (1.15.3) has the issue If you are using counter_cache (such as in acts_as_commentable as described here), you must make sure that after updating [...]

Popularity: 9% [?]