From 2da3cd66739dc6dfe11be7a44c75f5fc94ba40a0 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sun, 28 May 2017 14:12:37 +1200 Subject: [PATCH] Fixed location to redirect to afver comment add/update --- app/controllers/comments_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 124e4dbfe..e0f983425 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -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