Fix rendering team table [SCI-9039] (#5967)

* Fix rendering team table [SCI-9039]

* Remove unused def_delegator
This commit is contained in:
ivanscinote 2023-08-11 10:52:47 +02:00 committed by GitHub
parent a05bd7a6dd
commit e9ac5bed82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View file

@ -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,

View file

@ -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| %>
<p><%= t("users.settings.user_teams.destroy_uo_message",
user: user_assignment.user.full_name,
team: user_assignment.assignable.name) %></p>