summaryrefslogtreecommitdiff
path: root/app/models/project_team.rb
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/project_team.rb
parent420e59030b151a5634e31beaa1d80f1eac079295 (diff)
downloadgitlab-ce-b2c8dc6f35ceb08e23422a356831070b5136809d.tar.gz
Replace optional parameters with keyword arguments.
Diffstat (limited to 'app/models/project_team.rb')
-rw-r--r--app/models/project_team.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/models/project_team.rb b/app/models/project_team.rb
index cf1d2396974..1865c5253e2 100644
--- a/app/models/project_team.rb
+++ b/app/models/project_team.rb
@@ -15,7 +15,7 @@ class ProjectTeam
users, access, current_user = *args
if users.respond_to?(:each)
- add_users(users, access, current_user)
+ add_users(users, access, current_user: current_user)
else
add_user(users, access, current_user)
end
@@ -33,18 +33,18 @@ class ProjectTeam
member
end
- def add_users(users, access, current_user = nil, expires_at = nil)
+ def add_users(users, access, current_user: nil, expires_at: nil)
ProjectMember.add_users_into_projects(
[project.id],
users,
access,
- current_user,
- expires_at
+ current_user: current_user,
+ expires_at: expires_at
)
end
def add_user(user, access, current_user = nil)
- add_users([user], access, current_user)
+ add_users([user], access, current_user: current_user)
end
# Remove all users from project team