From 0f4d0b4fe93fb2cf68d7e09bbbacc8f0a7f25a5a Mon Sep 17 00:00:00 2001 From: Bertocq Date: Wed, 31 Jan 2018 17:19:26 +0100 Subject: [PATCH] Improve valuation flag at comment form --- app/views/comments/_form.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/comments/_form.html.erb b/app/views/comments/_form.html.erb index 8ceefdd59..702df0dd0 100644 --- a/app/views/comments/_form.html.erb +++ b/app/views/comments/_form.html.erb @@ -1,3 +1,4 @@ +<% valuation = local_assigns.fetch(:valuation, false) %> <% cache [locale_and_user_status, parent_id, commentable_cache_key(commentable)] do %> <% css_id = parent_or_commentable_dom_id(parent_id, commentable) %>
class="comment-form"> @@ -7,7 +8,7 @@ <%= f.hidden_field :commentable_type, value: commentable.class.name %> <%= f.hidden_field :commentable_id, value: commentable.id %> <%= f.hidden_field :parent_id, value: parent_id %> - <%= f.hidden_field :valuation, value: local_assigns.fetch(:valuation, false) %> + <%= f.hidden_field :valuation, value: valuation %> <%= f.submit comment_button_text(parent_id, commentable), class: "button", id: "publish_comment" %>