AutoCommit Sam Aug 1 01:03:01 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-08-01 01:03:01 +02:00
parent ca6deabb34
commit d5571b38fa
2 changed files with 4 additions and 2 deletions

View File

@@ -54,10 +54,11 @@ num = {"Beispiel"=> 2, "Survey::Question"=> 7}
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 }
format.js
else
format.html { render action: "new" }
format.json { render json: @comment.errors, status: :unprocessable_entity }
format.js {render action:"new"}
end
end
end