forked from bofh/fetsite
AutoCommit Fre Jul 31 22:03:01 CEST 2015
This commit is contained in:
@@ -52,6 +52,7 @@ class CommentsController < ApplicationController
|
|||||||
if @comment
|
if @comment
|
||||||
format.html { redirect_to @comment.commentable, notice: 'Comment was successfully created.', show_comments: true }
|
format.html { redirect_to @comment.commentable, notice: 'Comment was successfully created.', show_comments: true }
|
||||||
format.json { render json: @comment, status: :created, location: @comment }
|
format.json { render json: @comment, status: :created, location: @comment }
|
||||||
|
|
||||||
else
|
else
|
||||||
format.html { render action: "new" }
|
format.html { render action: "new" }
|
||||||
format.json { render json: @comment.errors, status: :unprocessable_entity }
|
format.json { render json: @comment.errors, status: :unprocessable_entity }
|
||||||
|
|||||||
Reference in New Issue
Block a user