forked from bofh/fetsite
AutoCommit Sam Aug 1 01:03:01 CEST 2015
This commit is contained in:
@@ -54,10 +54,11 @@ num = {"Beispiel"=> 2, "Survey::Question"=> 7}
|
|||||||
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 }
|
||||||
|
format.js
|
||||||
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 }
|
||||||
|
format.js {render action:"new"}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
$("#<%= @comment.commentable.formid %>").html("")
|
$("#<%= Comment.formid_for(@comment.parent) %>").html("")
|
||||||
|
$("#<%= Comment.wrapid_for(@comment.commentable) %>").html("<%= escape_javascript render partial:"comments/comments", object: @comments %>")
|
||||||
|
|||||||
Reference in New Issue
Block a user