title: rails: accepts_nested_attributes_for and attribute modification ajax
body: <p>I'm building a modification form for an entity with an accepts_nested_attributes_for on a has_many relation. I want that when a single input is modified, the info is sent using ajax to the server.</p>
  
  <p>Let say that we han an entity User, with a relation to post</p>
  
  <p>Using jquery I can modify main entity attributes:</p>
  
  <pre><code>$.post("/user/1", data={"_method":"put", "user[name]":"My New name"})
  </code></pre>
  
  <p>However, when I use:</p>
  
  <pre><code>$.post("/user/1", data={"_method":"put", "user[posts_attributes][0][text]":"my modified post"});
  </code></pre>
  
  <p>The post is not modified, but a new post is created with the given text.
  Do I need to include the post id?</p>
  
  <p>Thanks</p>