In my blog a user can add comments. I want an Ajax call to add the
comment to the bottom of the comments list.
How to i return a comment thats is in the comment template and add it to
the bottom of the page. I have gotten as far as rendering some text
back to the form and the comment doesn’t display until i refresh.
This is my _newcomment.rhtml form to create a new comment
<%= submit_tag "Comment!" %><%= end_form_tag %>
This is my def in the blog controller t handle the creation of the new
render_text “return the comment”
This is my partial to display a comment _comment.rhtml
<%= comment.name %> Says:
<%= comment.comment %>
<%= comment.created_at.to_s(:long) %>