From e9ac5bed827764d20b2689d0447a5a9dc0dae789 Mon Sep 17 00:00:00 2001 From: ivanscinote <138504771+ivanscinote@users.noreply.github.com> Date: Fri, 11 Aug 2023 10:52:47 +0200 Subject: [PATCH] Fix rendering team table [SCI-9039] (#5967) * Fix rendering team table [SCI-9039] * Remove unused def_delegator --- app/datatables/team_users_datatable.rb | 2 +- .../user_teams/_destroy_user_team_modal_body.html.erb | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/datatables/team_users_datatable.rb b/app/datatables/team_users_datatable.rb index 324885b0c..18cea0be7 100644 --- a/app/datatables/team_users_datatable.rb +++ b/app/datatables/team_users_datatable.rb @@ -66,7 +66,7 @@ class TeamUsersDatatable < CustomDatatable '2': record.user_role.name, '3': I18n.l(record.created_at, format: :full_date), '4': record.user.active_status_str, - '5': ApplicationController.new.render_to_string( + '5': @view.controller.render_to_string( partial: 'users/settings/teams/user_dropdown', locals: { user_assignment: record, diff --git a/app/views/users/settings/user_teams/_destroy_user_team_modal_body.html.erb b/app/views/users/settings/user_teams/_destroy_user_team_modal_body.html.erb index 104bf3bd1..fe336e059 100644 --- a/app/views/users/settings/user_teams/_destroy_user_team_modal_body.html.erb +++ b/app/views/users/settings/user_teams/_destroy_user_team_modal_body.html.erb @@ -1,8 +1,7 @@ <%= form_with model: user_assignment, url: destroy_user_team_path(user_assignment, format: :json), - data: { remote: true }, - method: :delete, - data: { id: 'destroy-user-team-form' } do |f| %> + data: { remote: true, id: 'destroy-user-team-form' }, + method: :delete do |f| %>
<%= t("users.settings.user_teams.destroy_uo_message", user: user_assignment.user.full_name, team: user_assignment.assignable.name) %>