Fixed location to redirect to afver comment add/update

This commit is contained in:
Brenda Wallace
2017-05-28 14:12:37 +12:00
committed by Shiny
parent 5d50f9aec2
commit 2da3cd6673

View File

@@ -31,12 +31,12 @@ class CommentsController < ApplicationController
@comment = Comment.new(comment_params)
@comment.author = current_member
@comment.save
respond_with(@comment.post)
respond_with @comment, location: @comment.post
end
def update
@comment.update(body: comment_params['body'])
respond_with(@comment.post)
respond_with @comment, location: @comment.post
end
def destroy