Module: NoReferrerHelper

Defined in:
lib/noreferrer.rb

Instance Method Summary collapse

Instance Method Details



2
3
4
5
6
# File 'lib/noreferrer.rb', line 2

def link_no_referrer title, url, options={}
  proc = Proc.new{|key| key == 'target' ? 'data-target' : key}
  opts = options.map{|k,v| "#{proc.call(k)}='#{v}'"}.join(' ')
  "<a data-url='#{url}' #{opts}>#{title}</a>".html_safe
end