diff options
author | Rémy Coutable <remy@rymai.me> | 2016-08-04 13:34:05 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-08-04 13:34:05 +0000 |
commit | db69111a63cfadb31cc02cf4400d743a913bdfbd (patch) | |
tree | 96ccd60c8829339bd1c7aea975a1b442042b33a0 /app/models | |
parent | b2d142c4a026b479925482c4756172d86888198b (diff) | |
parent | f15ed5f0a5c298a2f0eb5aaa6d848364133532a5 (diff) | |
download | gitlab-ce-db69111a63cfadb31cc02cf4400d743a913bdfbd.tar.gz |
Merge branch '20512-fix-rename-add-users-into-project-to-add-users-to-project-and-projects-ids-to-project-ids' into 'master'
Fix Rename `add_users_into_project` and `projects_ids`
## What does this MR do?
Only modifies the name of a method that leaves more semantic and expressive and the name of the keywords arguments to the rails convention.
## Are there points in the code the reviewer needs to double check?
Only if it has been changed at every point that is calling this method and that passing arguments.
## Why was this MR needed?
To make the code more expressive.
## What are the relevant issue numbers?
Closes #20512.
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- Tests
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
See merge request !5659
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/members/project_member.rb | 6 | ||||
-rw-r--r-- | app/models/project_team.rb | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/models/members/project_member.rb b/app/models/members/project_member.rb index f39afc61ce9..f176feddbad 100644 --- a/app/models/members/project_member.rb +++ b/app/models/members/project_member.rb @@ -21,19 +21,19 @@ class ProjectMember < Member # or symbol like :master representing role # # Ex. - # add_users_into_projects( + # add_users_to_projects( # project_ids, # user_ids, # ProjectMember::MASTER # ) # - # add_users_into_projects( + # add_users_to_projects( # project_ids, # user_ids, # :master # ) # - def add_users_into_projects(project_ids, user_ids, access, current_user = nil) + def add_users_to_projects(project_ids, user_ids, access, current_user = nil) access_level = if roles_hash.has_key?(access) roles_hash[access] elsif roles_hash.values.include?(access.to_i) diff --git a/app/models/project_team.rb b/app/models/project_team.rb index 19fd082534c..d0a714cd6fc 100644 --- a/app/models/project_team.rb +++ b/app/models/project_team.rb @@ -34,7 +34,7 @@ class ProjectTeam end def add_users(users, access, current_user = nil) - ProjectMember.add_users_into_projects( + ProjectMember.add_users_to_projects( [project.id], users, access, |