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