We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a3e489f commit 2289c1bCopy full SHA for 2289c1b
1 file changed
decidim-proposals/app/cells/decidim/proposals/proposal_g_cell.rb
@@ -62,7 +62,8 @@ def cache_hash
62
hash << Digest::MD5.hexdigest(model.authors.map(&:cache_key_with_version).to_s)
63
hash << (model.must_render_translation?(model.organization) ? 1 : 0) if model.respond_to?(:must_render_translation?)
64
hash << model.component.participatory_space.active_step.id if model.component.participatory_space.try(:active_step)
65
- hash << model.voted_by?(current_user)
+ hash << model.voted_by?(current_user) ? 1 : 0
66
+ hash << (current_user&.id || 0)
67
hash.join(Decidim.cache_key_separator)
68
end
69
0 commit comments