summaryrefslogtreecommitdiff
path: root/app/models/members
diff options
context:
space:
mode:
authorAdam Niedzielski <adamsunday@gmail.com>2016-08-02 20:37:22 +0200
committerAdam Niedzielski <adamsunday@gmail.com>2016-08-02 20:37:22 +0200
commitb2c8dc6f35ceb08e23422a356831070b5136809d (patch)
tree248fd3b5723e8fc2a8d19c05f1bce272a8e80cfc /app/models/members
parent420e59030b151a5634e31beaa1d80f1eac079295 (diff)
downloadgitlab-ce-b2c8dc6f35ceb08e23422a356831070b5136809d.tar.gz
Replace optional parameters with keyword arguments.
Diffstat (limited to 'app/models/members')
-rw-r--r--app/models/members/project_member.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/models/members/project_member.rb b/app/models/members/project_member.rb
index b86b536005b..d5666de79cc 100644
--- a/app/models/members/project_member.rb
+++ b/app/models/members/project_member.rb
@@ -33,7 +33,7 @@ class ProjectMember < Member
# :master
# )
#
- def add_users_into_projects(project_ids, user_ids, access, current_user = nil, expires_at = nil)
+ def add_users_into_projects(project_ids, user_ids, access, current_user: nil, expires_at: nil)
access_level = if roles_hash.has_key?(access)
roles_hash[access]
elsif roles_hash.values.include?(access.to_i)
@@ -49,7 +49,13 @@ class ProjectMember < Member
project = Project.find(project_id)
users.each do |user|
- Member.add_user(project.project_members, user, access_level, current_user, expires_at)
+ Member.add_user(
+ project.project_members,
+ user,
+ access_level,
+ current_user: current_user,
+ expires_at: expires_at
+ )
end
end
end