title: How rails do nested form in one form?
body: <p>The scenario is that, I want to design a <code>Post</code> form which is used to record what fruit I eat in one meal, include <code>picture</code>, <code>content</code>, many kind of <code>fruit</code>.
  The model relationship is that, </p>
  
  <pre><code>Post has_many fruits
  Fruit belong_to post
  </code></pre>
  
  <p>I usee <code>Jquery-ui</code> to make <code>autocomplete</code> in order to help user type their fruit. After they type there fruit tag, it will create a tag under the input field. 
  Like this </p>
  
  <p><a href="https://i.stack.imgur.com/YHm5l.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YHm5l.png" alt="enter image description here"></a></p>
  
  <p>However how to I create this in form? I thought about dynamic nested form, but I don't want there're a lots of form, I wish there would be only one input and do the same thing with dynamic nested form.</p>
  
  <p>Here is the <a href="https://github.com/fifiteen82726/agriblack/blob/master/app/views/posts/_form.html.erb" rel="nofollow noreferrer">github</a>, please let me know if I need to provide more information.</p>