mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-01 04:32:16 +08:00
Remove caching from user access modals [SCI-6163] (#3600)
This commit is contained in:
parent
35eb7bffdd
commit
0c8614c9ac
5 changed files with 18 additions and 34 deletions
|
@ -13,17 +13,13 @@
|
|||
</p>
|
||||
<hr />
|
||||
<% users.each do |user| %>
|
||||
<% user_assignment = experiment.user_assignments.find_by(user: user) %>
|
||||
|
||||
<% cache [user_assignment, experiment, user, current_user] do %>
|
||||
<%= render partial: 'access_permissions/partials/experiment_member_field',
|
||||
locals: {
|
||||
user: user,
|
||||
project: project,
|
||||
experiment: experiment,
|
||||
update_path: access_permissions_project_experiment_path(project, experiment)
|
||||
} %>
|
||||
<% end %>
|
||||
<%= render partial: 'access_permissions/partials/experiment_member_field',
|
||||
locals: {
|
||||
user: user,
|
||||
project: project,
|
||||
experiment: experiment,
|
||||
update_path: access_permissions_project_experiment_path(project, experiment)
|
||||
} %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
|
|
@ -10,10 +10,7 @@
|
|||
<div class="modal-body">
|
||||
<% users.each do |user| %>
|
||||
<% user_assignment = experiment.user_assignments.find_by(user: user) %>
|
||||
|
||||
<% cache [user_assignment, experiment, current_user, user] do %>
|
||||
<%= render partial: 'access_permissions/partials/user_assignment', locals: { user_assignment: user_assignment, user: user, resource: experiment } %>
|
||||
<% end %>
|
||||
<%= render partial: 'access_permissions/partials/user_assignment', locals: { user_assignment: user_assignment, user: user, resource: experiment } %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
|
|
@ -13,18 +13,14 @@
|
|||
</p>
|
||||
<hr />
|
||||
<% users.each do |user| %>
|
||||
<% user_assignment = my_module.user_assignments.find_by(user: user) %>
|
||||
|
||||
<% cache [user_assignment, my_module, user, current_user] do %>
|
||||
<%= render partial: 'access_permissions/partials/my_module_member_field',
|
||||
locals: {
|
||||
user: user,
|
||||
project: project,
|
||||
experiment: experiment,
|
||||
my_module: my_module,
|
||||
update_path: access_permissions_project_experiment_my_module_path(project, experiment, my_module)
|
||||
} %>
|
||||
<% end %>
|
||||
<%= render partial: 'access_permissions/partials/my_module_member_field',
|
||||
locals: {
|
||||
user: user,
|
||||
project: project,
|
||||
experiment: experiment,
|
||||
my_module: my_module,
|
||||
update_path: access_permissions_project_experiment_my_module_path(project, experiment, my_module)
|
||||
} %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
|
|
@ -10,10 +10,7 @@
|
|||
<div class="modal-body">
|
||||
<% users.each do |user| %>
|
||||
<% user_assignment = my_module.user_assignments.find_by(user: user) %>
|
||||
|
||||
<% cache [user_assignment, my_module, current_user, user] do %>
|
||||
<%= render partial: 'access_permissions/partials/user_assignment', locals: { user_assignment: user_assignment, user: user, resource: my_module } %>
|
||||
<% end %>
|
||||
<%= render partial: 'access_permissions/partials/user_assignment', locals: { user_assignment: user_assignment, user: user, resource: my_module } %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
|
|
@ -9,9 +9,7 @@
|
|||
</div>
|
||||
<div class="modal-body">
|
||||
<% resource.user_assignments.each do |user_assignment| %>
|
||||
<% cache [user_assignment, resource, current_user, user_assignment.user] do %>
|
||||
<%= render partial: 'access_permissions/partials/user_assignment', locals: { user_assignment: user_assignment, user: user_assignment.user, resource: resource } %>
|
||||
<% end %>
|
||||
<%= render partial: 'access_permissions/partials/user_assignment', locals: { user_assignment: user_assignment, user: user_assignment.user, resource: resource } %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
|
Loading…
Reference in a new issue