From 31323dca8b8564ee9cb1e2809210cbe78bb9c3d7 Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Thu, 10 Jul 2014 09:33:04 -0300 Subject: [PATCH] Fix comment_form_extra_contents hotspot --- app/views/comment/_comment_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/comment/_comment_form.html.erb b/app/views/comment/_comment_form.html.erb index 7c0284d..549354f 100644 --- a/app/views/comment/_comment_form.html.erb +++ b/app/views/comment/_comment_form.html.erb @@ -81,7 +81,7 @@ function check_captcha(button, confirm_action) { <%= hidden_field_tag(:view, params[:view])%> <%= f.hidden_field(:reply_of_id) %> - <%= @plugins.dispatch(:comment_form_extra_contents, local_assigns).collect { |content| instance_exec(&content) }.join("") %> + <%= @plugins.dispatch(:comment_form_extra_contents, local_assigns.merge(:comment => @comment)).collect { |content| instance_exec(&content) }.join("") %> <% button_bar do %> <%= submit_button('add', _('Post comment'), :onclick => "if(check_captcha(this)) { save_comment(this) } else { check_captcha(this, save_comment)};return false;") %> -- libgit2 0.21.2