title: Rails delegate update call
body: <p>I have two models:<br>
  <code>User</code> (email:string)<br>
  <code>Profile</code> (name:string)<br></p>
  
  <pre class="lang-rb prettyprint-override"><code>class User &lt; ActiveRecord::Base
     has_one :profile   
     delegate :name, :name=, :to =&gt; :profile   
  end
  </code></pre>
  
  <pre class="lang-rb prettyprint-override"><code>class Profile &lt; ActiveRecord::Base
    belongs_to :user
  end
  </code></pre>
  
  <p><code>rails c</code></p>
  
  <pre><code>u = User.new 
  u.build_profile         #=&gt; init Profile
  u.name = 'foo'
  u.email = 'some@ema.il'
  u.save                  #=&gt; both User and Profile are saved
  
  u.name = 'bar'
  u.save                  #=&gt; true, but changes in Profile were not saved!
  
  u.email = 'new@ema.il'
  u.save                  #=&gt; true, new User email was saved, Profile - still not!
  
  u.name                  #=&gt; 'bar', but in database it's 'foo' 
  </code></pre>
  
  <p>Why the Profile is not being updated(saved only for the first time)? How to fix this?</p>