mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 09:42:46 +08:00
Fixed cached user lists when changing assignments [SCI-6137] (#3597)
Fixed cache invalidation for assignables, current_user missing in cache keys [SCI-6137]
This commit is contained in:
parent
c63090da8c
commit
3746332c30
3 changed files with 3 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class UserAssignment < ApplicationRecord
|
||||
belongs_to :assignable, polymorphic: true
|
||||
belongs_to :assignable, polymorphic: true, touch: true
|
||||
belongs_to :user_role
|
||||
belongs_to :user
|
||||
belongs_to :assigned_by, class_name: 'User', optional: true
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<% users.each do |user| %>
|
||||
<% user_assignment = experiment.user_assignments.find_by(user: user) %>
|
||||
|
||||
<% cache [user_assignment, experiment, user] do %>
|
||||
<% cache [user_assignment, experiment, user, current_user] do %>
|
||||
<%= render partial: 'access_permissions/partials/experiment_member_field',
|
||||
locals: {
|
||||
user: user,
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<% users.each do |user| %>
|
||||
<% user_assignment = my_module.user_assignments.find_by(user: user) %>
|
||||
|
||||
<% cache [user_assignment, my_module, user] do %>
|
||||
<% cache [user_assignment, my_module, user, current_user] do %>
|
||||
<%= render partial: 'access_permissions/partials/my_module_member_field',
|
||||
locals: {
|
||||
user: user,
|
||||
|
|
Loading…
Reference in a new issue