2019-08-30 18:16:39 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module ExternalLinkHelper
|
2019-09-03 17:26:39 -04:00
|
|
|
def external_link(body, url, options = {})
|
|
|
|
link_to url, { target: '_blank', rel: 'noopener noreferrer' }.merge(options) do
|
2021-01-28 16:09:04 -05:00
|
|
|
"#{body}#{sprite_icon('external-link', css_class: 'gl-ml-1')}".html_safe
|
2019-08-30 18:16:39 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|