Here's the flow I have...
First, jquery posts the new comment to the server:
Then in the comments controller:
@comment = lots of stuff going on here but it works...
flash[:notice] = "Successfully created comment."
respond_to do |format|
Ok and this is where I'm stuck, then the create.js.erb:
And the partial:
<div class="cmtBox" id="comment_<%=comment.id%>">
Where I'm stuck is calling the partial in create.js.erb... How do I
pass what Rails needs to populate the partial? Right now I get the
error: "Called id for nil, which would mistakenly be 4 -- if you
really wanted the id of nil, use object_id" Thanks!