AutoCommit Fre Jul 31 22:03:01 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-07-31 22:03:01 +02:00
parent ca903cf84b
commit 4bb81ef9d1

View File

@@ -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 }