Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Ray Wu's Profile

GitHub User: raywu

Site: http://raywu.tumblr.com

Comments by Ray Wu

Avatar

For those looking for has_many :through counter cache, here's a great post on stackoverflow.

In Rails3.0.5 you are now able to set counter cache to the "linker" model, in your case it will be:

class Meeting_user < ActiveRecord::Base
belongs_to :meeting, :counter_cache => "users_count"
belongs_to :user, :counter_cache => "meetings_count"

http://stackoverflow.com/questions/4700247/counter-cache-has-many-through-sql-optimisation-reduce-number-of-sql-queries

Avatar

Anyone experienced prePopulate tags not showing up on Heroku? I can't explain why most of my tags do, but the one with id#1 doesn't