Hmm, looking around this looks similar,
http://www.ruby-forum.com/topic/102613#new
however, where he initially put...
def add_comment
Post.find(params[:id]).comments.create(params[:comment])
end
was then replaced with...
def add_comment
@post = Post.find(params[:id])
@post.comments.create(params[:comment])
render :partial=>'post_comments_list'
end
which sounds much more right, as currently it looks like it's going off
to find the post that your going to attach the comment to but the
.create method is not firing as it has no object to use.
will try when i get home tonight, fingers crossed.
--
Posted via http://www.ruby-forum.com/.