title: Rails Throws RecordNotDestroyed Exception on destroy_all
body: <p>I have a batch worker that goes through and updates the database by cleaning up a table and then repopulating it. Specific rows in the database should be prevented from being destroyed and so I have a <code>before_destroy :dont_destroy_record</code> callback to make sure I don't delete specific records.</p>
  
  <p>The problem I am having is that active record throws an exception when calling <code>collection.destroy_all</code>, <code>ActiveRecord:RecordNotDestroyed</code>. This is thrown whenever the <code>:dont_destroy_record</code> callback returns false for those specific records.</p>
  
  <p>A couple solutions to the problem is wrapping <code>collection.destroy_all</code> in a try-catch or I could loop through the collection calling <code>destroy</code> on each object. Are there any other possible, or better, solutions to this problem? One constraint is that I can't change this batch worker very much since it is used in quite a few other projects and needs to be super generic.</p>
  
  <p>It seems odd to me that <code>destroy_all</code> would throw that exception since it is calling <code>destroy</code>. I'm also not seeing much in the documentation regarding throwing the exception.</p>