diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb
index b6aeb7b..4ab2988 100644
--- a/app/controllers/comments_controller.rb
+++ b/app/controllers/comments_controller.rb
@@ -22,7 +22,8 @@ num = {"Beispiel"=> 2, "Survey::Question"=> 7}
respond_to do |format|
- format.html # show.html.erb
+# format.html # show.html.erb
+ format.js
format.json { render json: @comment }
end
end
diff --git a/app/views/comments/_form.html.erb b/app/views/comments/_form.html.erb
index 0f9d2c8..d4499d0 100644
--- a/app/views/comments/_form.html.erb
+++ b/app/views/comments/_form.html.erb
@@ -1,14 +1,14 @@
- <%= semantic_form_for form , remote:true, html: {class: "form-inline"} do |f| %>
- <%= f.inputs do %>
- <%= f.input :commentable_id, as: :hidden %>
- <%= f.input :commentable_type, as: :hidden %>
- <%= f.input :text, as: :string %>
- <%= f.input :anonym %>
- <% end %>
-
- <%= f.actions do %>
- <%= f.action :submit, :as => :input %>
- <% end %>
-<% end %>
+ <%= semantic_form_for form , remote: true, html: {class: "form-inline"} do |f| %>
+ <%= f.inputs do %>
+ <%= f.input :commentable_id, as: :hidden %>
+ <%= f.input :commentable_type, as: :hidden %>
+ <%= f.input :text, as: :string %>
+ <%= f.input :anonym %>
+ <% end %>
+
+ <%= f.actions do %>
+ <%= f.action :submit, :as => :input %>
+ <% end %>
+ <% end %>
diff --git a/app/views/comments/create.js.erb b/app/views/comments/create.js.erb
index 8b13789..1a20c2e 100644
--- a/app/views/comments/create.js.erb
+++ b/app/views/comments/create.js.erb
@@ -1 +1 @@
-
+$("#<%= @comment.commentable.formid %>").html("")