Move to Rails 2.0.2
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 than that most of the things you need to know are well documented on the web .. this one took me almost a day to figure out so I am mentioning it on the blog
The move to rails 2.0.2 was motivated by the fact that I see all the new plugins and blog posts talking about rails 2 and so I did not want to miss out on all the new action and possibly other security updates etc
Popularity: 10% [?]
find this blog feedworthy. Click on the number to subscribe!
Related Posts
Comments
Thanks for the tip! Exactly what I needed to know.
I also found a per sql method which you can use if you have a lot of inital data and the pure rails way causes you method issues: http://www.mikeperham.com/2007/12/17/creating-a-counter_cache-column/
Even in rails 2.0.2 the counter_cache does not update only if the child is destroyed or a new one is created. If you update a child and switch their parent, the old parent’s counter is not decremented, and the new parent’s counter is not incremented.
I have been looking for a bugfix for 24 hours now, and no solution.

Came here via pluggd.in. Read your comment about having one founder and quite agree with you.
But most importantly, I though I would drop in a comment, because this blog looks lovely :)
You are on my reader now, will keep in touch.