title: Rails, Deleting Children without Deleting Parent using :has_many
body: <p>I have</p>
  
  <pre><code>class MyContainer &lt; ActiveRecord::Base
    :has_many MyObjects, :dependent =&gt; :destroy
  end
  </code></pre>
  
  <p>I want to delete all the <code>MyObjects</code> in the container without having to delete the <code>MyContainer</code>. My model does have <code>:dependent =&gt; :destroy</code>, however I don't want to have to delete and re-create the object because it is slower.</p>
  
  <p>Something like this does not work: </p>
  
  <pre><code>@obj = MyContainer.find_by_id(10)
  @obj.my_objects.delete_all
  </code></pre>
  
  <p>How can I accomplish this?</p>