Add user to cache dependencies of vote in events index
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 text "Not rated" in "…You voted: 3/5…"
# ./spec/features/voting_spec.rb:15
# ./spec/features/voting_spec.rb:13
# ./spec/features/voting_spec.rb:57
i.e. the vote displayed on the event index is another user’s vote,
because the fragment’s cache dependencies don’t include the current
user.
re #2767
This commit is contained in:
parent
17366c6eab
commit
1563881153
1 changed files with 1 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
|||
- cache ['admin', conference_id, program, event] do
|
||||
- cache ['admin', conference_id, program, event, current_user] do
|
||||
%tr{ id: "event-#{event.id}" }
|
||||
%td
|
||||
= event.id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue