Rails Nested Form - edit action & edit.html.erb won't display the form or related post content
<p>I made a form where a user can dynamically add nested form fields by clicking a text or url button. When the form is submitted, the content displays in the view template. However, when I go to edit (&amp; hopefully then update) a post at <code>/posts/id/edit</code>, the post content does not appear in the edit view template - it's a blank page in the browser. </p>

<p><a href="http://i.stack.imgur.com/B2ueq.png" rel="nofollow">log of SQL</a></p>

<p>Would really appreciate your help! Thank you!</p>

<p><strong>Post Model</strong></p>

<pre><code>class Post &lt; ActiveRecord::Base
  has_many :things, dependent: :destroy
  accepts_nested_attributes_for :things
end 
</code></pre>

<p><strong>Things Model</strong> </p>

<pre><code>class Thing &lt; ActiveRecord::Base
  belongs_to :post
end 
</code></pre>

<p><strong>Schema</strong></p>

<pre><code>create_table "posts", force: :cascade do |t|
  t.datetime "created_at", null: false
  t.datetime "updated_at", null: false
end

create_table "things", force: :cascade do |t|
 t.text     "text"
 t.string   "url"
 t.integer  "post_id"
end
</code></pre>

<p><strong>Posts Controller</strong> </p>

<pre><code>class PostsController &lt; ApplicationController

def edit
    @post = Post.find(params[:id])
end 

def update
end 
</code></pre>

<p><strong>new.html.erb</strong> </p>

<pre><code> &lt;button id='addtext'&gt;text&lt;/button&gt;
 &lt;button id='addurl'&gt;url&lt;/button&gt;

 &lt;%= form_for @post, url: posts_path, html: { multipart: true } do |f| %&gt;

 &lt;%= f.fields_for :thing do |ff| %&gt;
 &lt;% end %&gt; 
 &lt;%= f.submit %&gt;
 &lt;% end %&gt;
</code></pre>

<p><strong>posts.coffee</strong></p>

<pre><code> current_index = 0

 addText = -&gt;
 html = """
 &lt;div&gt;
 &lt;textarea placeholder="Write something..."     name="post[things_attributes][#{current_index}][text]"     id="post_things_attributes_#{current_index}_text"&gt;&lt;/textarea&gt;
 &lt;input type="hidden" name="post[things_attributes][#{current_index}]    [order]" id="post_things_attributes_#{current_index}_order" value="#{current_index}" /&gt;
 &lt;/div&gt;
 """

$("#new_post input[type='submit']").before(html)
current_index += 1

$ -&gt;
$('#addtext').on('click', addText)


current_index = 0
</code></pre>