summaryrefslogtreecommitdiff
path: root/app/helpers/external_link_helper.rb
diff options
context:
space:
mode:
authorjakeburden <jburden@gitlab.com>2019-09-03 17:26:39 -0400
committerjakeburden <jburden@gitlab.com>2019-09-03 18:06:44 -0400
commite6090e713b53ed748dc1a8fef962732bdf37ddfe (patch)
tree2d5f266a94ccf86177fc83906822cb60d0b3c4c9 /app/helpers/external_link_helper.rb
parent90dc19e9f0be8ac530b5e5e042791143ce0ba0ce (diff)
downloadgitlab-ce-e6090e713b53ed748dc1a8fef962732bdf37ddfe.tar.gz
Allow for the passing of options to external_link66067-pages-domain-doesnt-set-target-blank
Diffstat (limited to 'app/helpers/external_link_helper.rb')
-rw-r--r--app/helpers/external_link_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/external_link_helper.rb b/app/helpers/external_link_helper.rb
index fe908b3ae1c..9dbad1f5032 100644
--- a/app/helpers/external_link_helper.rb
+++ b/app/helpers/external_link_helper.rb
@@ -1,8 +1,8 @@
# frozen_string_literal: true
module ExternalLinkHelper
- def external_link(body, url)
- link_to url, target: '_blank', rel: 'noopener noreferrer' do
+ def external_link(body, url, options = {})
+ link_to url, { target: '_blank', rel: 'noopener noreferrer' }.merge(options) do
"#{body} #{icon('external-link')}".html_safe
end
end