osem-fcy/app
Andrew Kvalheim 1563881153 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
2023-03-01 11:43:50 -08:00
..
assets Minor fixes 2022-05-20 16:09:31 +02:00
controllers Merge pull request #2972 from AndrewKvalheim/ajax-datatables-rails-1_part-2 2022-03-29 15:15:10 +02:00
datatables Use CSS-compatible row IDs in datatables 2022-09-13 11:06:22 -07:00
helpers Migrate to fontawesome 6 2022-05-18 06:33:47 +02:00
jobs Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
mailers Rubocop autocorrections 2018-11-16 09:06:05 -08:00
models Update events when rated 2023-03-01 11:33:21 -08:00
pdfs Fix ticket PDF spec 2022-02-23 14:36:06 +01:00
serializers Required changes for consistent controller & feature results 2018-11-20 17:30:56 -08:00
uploaders Rename deprecated CarrierWave methods 2021-08-18 14:10:31 +02:00
views Add user to cache dependencies of vote in events index 2023-03-01 11:43:50 -08:00