Could you have just used:  @comment = @post.comments << Comment.new(comment_params)
?