From 4bb81ef9d1474e6d83e795e48112d22e818c16af Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Fri, 31 Jul 2015 22:03:01 +0200 Subject: [PATCH] AutoCommit Fre Jul 31 22:03:01 CEST 2015 --- app/controllers/comments_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 39e0490..fe95fd5 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -52,6 +52,7 @@ class CommentsController < ApplicationController if @comment format.html { redirect_to @comment.commentable, notice: 'Comment was successfully created.', show_comments: true } format.json { render json: @comment, status: :created, location: @comment } + else format.html { render action: "new" } format.json { render json: @comment.errors, status: :unprocessable_entity }