diff options
author | skv <skv-headless@yandex.ru> | 2014-01-19 22:55:59 +0400 |
---|---|---|
committer | skv <skv-headless@yandex.ru> | 2014-01-19 23:39:56 +0400 |
commit | a3f645ef51ec12ce93934b4ddb11313613d8c451 (patch) | |
tree | f30e76940e436049aa83a8c60741bc6c2d9b7f44 /app/controllers/projects/team_members_controller.rb | |
parent | 3fe578a7fdaea8607cf98ffb1878c03fd5ac3649 (diff) | |
download | gitlab-ce-a3f645ef51ec12ce93934b4ddb11313613d8c451.tar.gz |
Remove deprecated finders
Diffstat (limited to 'app/controllers/projects/team_members_controller.rb')
-rw-r--r-- | app/controllers/projects/team_members_controller.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/projects/team_members_controller.rb b/app/controllers/projects/team_members_controller.rb index 2c40b3c75f2..44068878cd1 100644 --- a/app/controllers/projects/team_members_controller.rb +++ b/app/controllers/projects/team_members_controller.rb @@ -26,7 +26,7 @@ class Projects::TeamMembersController < Projects::ApplicationController end def update - @user_project_relation = project.users_projects.find_by_user_id(member) + @user_project_relation = project.users_projects.find_by(user_id: member) @user_project_relation.update_attributes(params[:team_member]) unless @user_project_relation.valid? @@ -36,7 +36,7 @@ class Projects::TeamMembersController < Projects::ApplicationController end def destroy - @user_project_relation = project.users_projects.find_by_user_id(member) + @user_project_relation = project.users_projects.find_by(user_id: member) @user_project_relation.destroy respond_to do |format| @@ -46,7 +46,7 @@ class Projects::TeamMembersController < Projects::ApplicationController end def leave - project.users_projects.find_by_user_id(current_user).destroy + project.users_projects.find_by(user_id: current_user).destroy respond_to do |format| format.html { redirect_to :back } @@ -65,6 +65,6 @@ class Projects::TeamMembersController < Projects::ApplicationController protected def member - @member ||= User.find_by_username(params[:id]) + @member ||= User.find_by(username: params[:id]) end end |