diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-03-23 21:20:48 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-03-23 21:20:48 +0100 |
commit | f039e8e03fb341e0cdca1c2597438549c84e15f1 (patch) | |
tree | df2be08e765f35730279162fdd0fcb8361790cea /app/mailers | |
parent | 2953e0d19b46a937ee9d84139adbc263c8e89757 (diff) | |
download | gitlab-ce-f039e8e03fb341e0cdca1c2597438549c84e15f1.tar.gz |
Don't use required keyword arguments to maintain support for Ruby 2.0.
Diffstat (limited to 'app/mailers')
-rw-r--r-- | app/mailers/emails/projects.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/app/mailers/emails/projects.rb b/app/mailers/emails/projects.rb index 48458baa674..3cd812825e2 100644 --- a/app/mailers/emails/projects.rb +++ b/app/mailers/emails/projects.rb @@ -16,13 +16,17 @@ module Emails subject: subject("Project was moved")) end - def repository_push_email(project_id, recipient, author_id:, - ref:, - action:, + def repository_push_email(project_id, recipient, author_id: nil, + ref: nil, + action: nil, compare: nil, reverse_compare: false, send_from_committer_email: false, disable_diffs: false) + unless author_id && ref && action + raise ArgumentError, "missing keywords: author_id, ref, action" + end + @project = Project.find(project_id) @author = User.find(author_id) @reverse_compare = reverse_compare |