title: Delete all in rails console
body: <p>i have an association for a user as <code>user  has_many agents</code> and <code>agent belongs_to user</code>.
  <strong>in rails console</strong>,i am trying to use different users to test a particular scenario and i want a user with no agents,hence i want to delete the <code>user.agents</code>.
  i tried <code>user.agents.map(&amp;:destroy)</code>,but it gives error as <code>ActiveRecord::StaleObjectError: Attempted to delete a stale object</code>.i even tried <code>user.agents.delete_all</code> but it too does not work.can i delete the users agents with a single command in <strong>rails console</strong>.</p>