Commit 3910b591 authored by Marin Jankovski's avatar Marin Jankovski

Extend default link_to helper to add noreferrer html_option.

parent 749d198f
......@@ -231,4 +231,18 @@ module ApplicationHelper
content_tag(:i, nil, class: 'icon-spinner icon-spin') + text
end
end
def link_to(name = nil, options = nil, html_options = nil, &block)
if html_options
if html_options[:rel]
html_options[:rel] << " noreferrer"
else
html_options.merge(rel: "noreferrer")
end
else
html_options = Hash.new
html_options[:rel] = "noreferrer"
end
super
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment