debian-mirror-gitlab/app/helpers/external_link_helper.rb

10 lines
283 B
Ruby
Raw Normal View History

2019-12-04 20:38:33 +05:30
# frozen_string_literal: true
module ExternalLinkHelper
def external_link(body, url, options = {})
link_to url, { target: '_blank', rel: 'noopener noreferrer' }.merge(options) do
2021-03-11 19:13:27 +05:30
"#{body}#{sprite_icon('external-link', css_class: 'gl-ml-1')}".html_safe
2019-12-04 20:38:33 +05:30
end
end
end