From 04f6a73d7361443dddde38a40653332c34291633 Mon Sep 17 00:00:00 2001 From: Andrew Kvalheim Date: Wed, 1 Mar 2023 11:52:16 -0800 Subject: [PATCH] Add user to cache dependencies of event proposal tab MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When fragment caching is enabled— --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -27 +26,0 @@ - config.action_controller.perform_caching = false @@ -29 +27,0 @@ - config.cache_store = :null_store —the test of voting fails with: expected to find visible css ".rating.bright" … 0 times, found 3 matches expected to find visible css ".rating:not(.bright)" … 5 times, found 2 matches # ./spec/features/voting_spec.rb:21 # ./spec/features/voting_spec.rb:21 # ./spec/features/voting_spec.rb:57 i.e. the vote displayed in the event proposal tab is another user’s vote, because the fragment’s cache dependencies don’t include the current user. resolves #2767 --- app/views/admin/events/_proposal.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/events/_proposal.html.haml b/app/views/admin/events/_proposal.html.haml index 12f0efb6..17ed991d 100644 --- a/app/views/admin/events/_proposal.html.haml +++ b/app/views/admin/events/_proposal.html.haml @@ -1,4 +1,4 @@ -- cache ['admin/event', @conference, @program, @event] do +- cache ['admin/event', @conference, @program, @event, current_user] do .row .col-md-12 %h3