I've a simple application that contains post that has many comments.
I can create comments from posts#show with the following form.
<%= form_for @comment, :remote => true, :html => {:'data-type' => 'html', :id => 'create_comment_form' }, :'data-update-target' => 'comments-container'$
<%= f.text_area :content %>
<%= f.hidden_field :post_id, :value => @post.id %>
<%= f.submit 'Submit', :disable_with => 'Please wait...', :class => 'submit' %>
<% end %>
And then I show the comments with
<div id="comments-container">
<%= render "posts/comments" %>
</div>
which loops through @post.comments.
Is it possible to update @post.comments and rerender the partial when the form is submited?