title: ActiveRecord Save Dependent Model
body: <p>I am trying to save a model with its dependency models being saved.</p>
  
  <pre><code>Model1
      has_many :model2, :autosave =&gt; true
  
  Model2
      belongs_to :model1
      has_many :model3, :autosave =&gt; true
  
  Model3
      belongs_to :model2
  </code></pre>
  
  <p>I want to save Model1, and have Model2 and 3 save as well. I tried this without and with the autosave feature. What winds up happening is Model1 is saved, Model2 is saved, Model3 is untouched. Is there a way to tell ActiveRecord that for this save I want to save the model and all child models all at once?</p>
  
  <p>As a side note, all 3 are just created and are not in the database. I cannot do .create on the models because I cannot save them until all validation passes and all business logic succeeds (has to be a transaction).</p>