title: rails counter cache while destroy
body: <p>For example, I have three model user, question and answer, and the relationship between them are:</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
    has_many :answers
    has_many :questions
  end
  
  class Question &lt; ActiveRecord::Base
    has_many :answers, :dependent =&gt; :destroy
    belongs_to :user, :counter_cache =&gt; true
  end
  
  class Answer &lt; ActiveRecord::Base
    belongs_to :user, :counter_cache =&gt; true
    belongs_to :question, :counter_cache =&gt; true
  end
  </code></pre>
  
  <p>Then when i want to destroy a question(with 1000 answers), these will happen:
  The answers will destroy one by one and will update the counter in the user model, even the counter in the question i want to destroy, and which will take a long time to do the counter update.</p>
  
  <p>my question is how to make it faster?</p>