From 9bb9585a4336cb07d640373f087dc390a99815f6 Mon Sep 17 00:00:00 2001 From: Lekhika Dugtal Date: Fri, 19 Apr 2019 10:55:31 +0530 Subject: [PATCH] make comment id unique --- app/views/comments/_form.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/comments/_form.html.erb b/app/views/comments/_form.html.erb index b4778823d3..1e34e297fe 100644 --- a/app/views/comments/_form.html.erb +++ b/app/views/comments/_form.html.erb @@ -1,6 +1,6 @@
-
action= "/answers/create/<%= @node.nid %>" <% elsif !local_assigns[:aid].blank? %> action= "/comment/answer_create/<%= aid %>" <% else %> action="/comment/create/<%= @node.nid %><%= "?type=question" if local_assigns[:type]=="question" %>" <% end %> <% if local_assigns[:aid].blank? %>method="post"<% end %>> + <%= rand(10000) %>" data-remote="true" <% if !local_assigns[:is_answer].blank? %> action= "/answers/create/<%= @node.nid %>" <% elsif !local_assigns[:aid].blank? %> action= "/comment/answer_create/<%= aid %>" <% else %> action="/comment/create/<%= @node.nid %><%= "?type=question" if local_assigns[:type]=="question" %>" <% end %> <% if local_assigns[:aid].blank? %>method="post"<% end %>>

<%= title %><% if current_user && current_user.id == @node.uid %> Add a response template<% end %>

@@ -46,7 +46,7 @@