Prevent app crash if team owner removed
This commit is contained in:
parent
3a09f02e11
commit
9bb35e7e59
3 changed files with 42 additions and 16 deletions
|
@ -26,7 +26,7 @@
|
|||
%tr
|
||||
%td
|
||||
%strong= link_to group.name, [:admin, group]
|
||||
%td= group.description
|
||||
%td= truncate group.description
|
||||
%td= group.path
|
||||
%td= group.projects.count
|
||||
%td
|
||||
|
|
|
@ -27,12 +27,15 @@
|
|||
%tr
|
||||
%td
|
||||
%strong= link_to team.name, admin_team_path(team)
|
||||
%td= team.description
|
||||
%td= truncate team.description
|
||||
%td= team.path
|
||||
%td= team.projects.count
|
||||
%td= team.members.count
|
||||
%td
|
||||
= link_to team.owner.name, admin_user_path(team.owner)
|
||||
- if team.owner
|
||||
= link_to team.owner.name, admin_user_path(team.owner)
|
||||
- else
|
||||
(deleted)
|
||||
%td.bgred
|
||||
= link_to 'Edit', edit_admin_team_path(team), id: "edit_#{dom_id(team)}", class: "btn btn-small"
|
||||
= link_to 'Destroy', admin_team_path(team), confirm: "REMOVE #{team.name}? Are you sure?", method: :delete, class: "btn btn-small btn-remove"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue