diff options
author | Rémy Coutable <remy@rymai.me> | 2016-07-28 20:31:17 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-10-03 17:57:48 +0300 |
commit | 3158f57dba6dcef3e586ae8fced7deb6fdbd6dc0 (patch) | |
tree | 51c000c699b1199f3838c3c46c5ac5dbe16773bd /app/controllers/projects/project_members_controller.rb | |
parent | 958815a039af68dc68b333b69b3e9e3f3bc4ee2e (diff) |
Improve Members::DestroyService
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/controllers/projects/project_members_controller.rb')
-rw-r--r-- | app/controllers/projects/project_members_controller.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/app/controllers/projects/project_members_controller.rb b/app/controllers/projects/project_members_controller.rb index 2343c7d20ec..1c07dd2e18b 100644 --- a/app/controllers/projects/project_members_controller.rb +++ b/app/controllers/projects/project_members_controller.rb @@ -55,10 +55,7 @@ class Projects::ProjectMembersController < Projects::ApplicationController end def destroy - @project_member = @project.members.find_by(id: params[:id]) || - @project.requesters.find_by(id: params[:id]) - - Members::DestroyService.new(@project_member, current_user).execute + Members::DestroyService.new(@project, current_user, user_id: params[:id]).execute(:all) respond_to do |format| format.html do |