title: Ruby on Rails autosave associations
body: <p>I have three associated classes in Rails v. 3.2.15, with Ruby 2.1.1, and a join-table class between two of them:</p>
  
  <pre><code>class Grandarent &lt; ActiveRecord::Base
    has_many :parents, autosave: true
  end
  
  class Parent
    belongs_to :grandparent
    has_many :children, :through =&gt; :parent_children, autosave: true
  end
  
  class ParentChild
    belongs_to :parent
    belongs_to :child
  end
  
  class Child
    has_many :parent_children
    has_many :parents, :through =&gt; :parent_children
  end
  </code></pre>
  
  <p>If I execute the following, then changes to child are not saved:</p>
  
  <pre><code>gp = Grandparent.find(1)
  gp.parents.first.children.first.first_name = "Bob"
  gp.save
  gp.parents.first.children.first.first_name  ## -&gt; Whatever name was to begin with (i.e. NOT Bob)
  </code></pre>
  
  <p>But if I force Rails to evaluate and return data from each connection, then the save is successful</p>
  
  <pre><code>gp = Grandparent.find(1)
  gp.parents
  gp.parents.first
  gp.parents.first.children
  gp.parents.first.children.first
  gp.parents.first.children.first.first_name = "Bob"
  gp.save
  gp.parents.first.children.first.first_name  ## -&gt; "Bob"
  </code></pre>
  
  <p>If I subsequently execute gp = Grandparent.find(1) again, then I've reset the whole thing, and have to force the evaluation of associations again.</p>
  
  <p>Is this intentional behavior, or have I done something wrong?  Do I need to hang an autosave on the join table connections as well as (or instead of) the has_many :through connection?</p>
  
  <p>From the documentation, I see that "loaded" members will be saved.  Is this what is necessary to load them?  Can someone define exactly what "loaded" is, and how to achieve that state?</p>