diff options
author | jakeburden <jburden@gitlab.com> | 2019-09-04 00:26:39 +0300 |
---|---|---|
committer | jakeburden <jburden@gitlab.com> | 2019-09-04 01:06:44 +0300 |
commit | e6090e713b53ed748dc1a8fef962732bdf37ddfe (patch) | |
tree | 2d5f266a94ccf86177fc83906822cb60d0b3c4c9 /app | |
parent | 90dc19e9f0be8ac530b5e5e042791143ce0ba0ce (diff) |
Allow for the passing of options to external_link
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/external_link_helper.rb | 4 |
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 |