Update user finding (by username) in teams_members (project team) controller
This commit is contained in:
parent
f225ff8674
commit
e1679d20c7
|
@ -39,7 +39,7 @@ class TeamMembersController < ProjectResourceController
|
|||
end
|
||||
|
||||
def destroy
|
||||
@user_project_relation = project.users_projects.find_by_user_id(params[:id])
|
||||
@user_project_relation = project.users_projects.find_by_user_id(member)
|
||||
@user_project_relation.destroy
|
||||
|
||||
respond_to do |format|
|
||||
|
@ -59,6 +59,6 @@ class TeamMembersController < ProjectResourceController
|
|||
protected
|
||||
|
||||
def member
|
||||
@member ||= User.find(params[:id])
|
||||
@member ||= User.find_by_username(params[:id])
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue