Add valuation flag to comment form cache key

This commit is contained in:
Bertocq
2018-01-31 22:26:03 +01:00
parent 48f084d0a2
commit 10d780ea4b

View File

@@ -1,5 +1,5 @@
<% valuation = local_assigns.fetch(:valuation, false) %>
<% cache [locale_and_user_status, parent_id, commentable_cache_key(commentable)] do %>
<% cache [locale_and_user_status, parent_id, commentable_cache_key(commentable), valuation] do %>
<% css_id = parent_or_commentable_dom_id(parent_id, commentable) %>
<div id="js-comment-form-<%= css_id %>" <%= "style='display:none'".html_safe if toggeable %> class="comment-form">
<%= form_for Comment.new, remote: true do |f| %>