diff --git a/app/views/comments/_comment.html.erb b/app/views/comments/_comment.html.erb
index faac3f4..5d71753 100644
--- a/app/views/comments/_comment.html.erb
+++ b/app/views/comments/_comment.html.erb
@@ -6,7 +6,7 @@
<%= (!comment.anonym) ? comment.user.try(:email) : "Anonym" %>
(<%= I18n.l(comment.created_at) %>)
- <%= link_to ffi1_icon("remove9"), comment, method: :delete, data: { confirm: 'Are you sure?' }, remote: true %>:
+ <%= link_to ffi1_icon("remove9"), comment_path(comment), method: :delete, data: { confirm: 'Are you sure?' }, remote: true %>:
<%= comment.text %>
<% if can?(:comment, comment.commentable) %>
diff --git a/app/views/comments/_comments_block.html.erb b/app/views/comments/_comments_block.html.erb
index 6b88bb1..861328d 100644
--- a/app/views/comments/_comments_block.html.erb
+++ b/app/views/comments/_comments_block.html.erb
@@ -3,9 +3,9 @@
<% unless comments_block.comments.roots.empty? %>
-
-
-
+
+
+
<% end %>
diff --git a/app/views/comments/hide.js.erb b/app/views/comments/hide.js.erb
index 35ec342..02b34a5 100644
--- a/app/views/comments/hide.js.erb
+++ b/app/views/comments/hide.js.erb
@@ -1,3 +1,3 @@
$("#<%= Comment.wrapid_for(@commentable) %>").html("<%= escape_javascript "" %>")
-$("#<%= Comment.switchshowid_for(@commentable) %>").replaceWith("<%= escape_javascript link_to "Comments...", comments_path(commentable_type: @commentable.class.to_s, commentable_id: @commentable.id) %>")
+$("#<%= Comment.switchshowid_for(@commentable) %>").replaceWith("<%= escape_javascript link_to "Comments...", comments_path(commentable_type: @commentable.class.to_s.gsub("::","_"), commentable_id: @commentable.id), remote: true, id: Comment.switchshowid_for( @commentable) %>")
diff --git a/app/views/comments/index.js.erb b/app/views/comments/index.js.erb
index 13d7356..2bc3ead 100644
--- a/app/views/comments/index.js.erb
+++ b/app/views/comments/index.js.erb
@@ -1,2 +1,2 @@
$("#<%= Comment.wrapid_for(@commentable) %>").html("<%= escape_javascript render partial:"comments/comments", object: @comments %>")
-$("#<%= Comment.switchshowid_for(@commentable) %>").attr("href","<%= escape_javascript hide_comments_path(commentable_type: @commentable.class.to_s, commentable_id: @commentable.id) %>")
+ $("#<%= Comment.switchshowid_for(@commentable) %>").replaceWith("<%= escape_javascript link_to "Ausblenden", hide_comments_path(params: {commentable_type: @commentable.class.to_s.gsub("::","_"), commentable_id: @commentable.id}), remote: true , id: Comment.switchshowid_for( @commentable) %>")
diff --git a/config/routes.rb b/config/routes.rb
index 241a301..a51a3ad 100755
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,5 +1,14 @@
Fetsite::Application.routes.draw do
- resources :comments
+ resources :comments, except: [:show] do
+ collection do
+ get 'hide'
+ end
+ end
+
+ resources :comments, contstraints: {id: /[0-9]+/}, only: :show
+
+
+
namespace :survey do
resources :questions do
@@ -161,11 +170,6 @@
end
end
end
- resources :comments do
- collection do
- get 'hide'
- end
- end
resources :home, :only=>[:index] do
get :search, :on => :collection
collection do