summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Ho <ClemMakesApps@gmail.com>2017-09-19 11:49:58 -0500
committerClement Ho <ClemMakesApps@gmail.com>2017-09-19 11:49:58 -0500
commit2d1020ae986066a15de814af8dcd5319a9763206 (patch)
tree4b1fa27484633843c0a9c94ae7a9017f0fcd965d
parent50d591c68e8311fb426c98fed6bc5266ec6cd7e6 (diff)
downloadgitlab-ce-2d1020ae986066a15de814af8dcd5319a9763206.tar.gz
Use keyword argument
-rw-r--r--app/helpers/commits_helper.rb2
-rw-r--r--app/views/projects/diffs/_file.html.haml2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb
index 213c2a5d133..ef22cafc2e2 100644
--- a/app/helpers/commits_helper.rb
+++ b/app/helpers/commits_helper.rb
@@ -176,7 +176,7 @@ module CommitsHelper
end
end
- def view_file_button(commit_sha, diff_new_path, project, replaced = false)
+ def view_file_button(commit_sha, diff_new_path, project, replaced: false)
title = replaced ? _('View replaced file @ ') : _('View file @ ')
link_to(
diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml
index 227aa372717..947b4c419c2 100644
--- a/app/views/projects/diffs/_file.html.haml
+++ b/app/views/projects/diffs/_file.html.haml
@@ -22,7 +22,7 @@
- if image_diff && image_replaced
- = view_file_button(diff_file.old_content_sha, diff_file.old_path, project, true)
+ = view_file_button(diff_file.old_content_sha, diff_file.old_path, project, replaced: true)
= view_file_button(diff_file.content_sha, diff_file.file_path, project)
= view_on_environment_button(diff_file.content_sha, diff_file.file_path, environment) if environment