Module: NoReferrerHelper
- Defined in:
- lib/noreferrer.rb
Instance Method Summary collapse
Instance Method Details
#link_no_referrer(title, url, options = {}) ⇒ Object
2 3 4 5 6 |
# File 'lib/noreferrer.rb', line 2 def link_no_referrer title, url, ={} proc = Proc.new{|key| key == :target ? 'data-target' : key} opts = .map{|k,v| "#{proc.call(k)}='#{v}'"}.join(' ') "<a data-url='#{url}' #{opts}>#{title}</a>".html_safe end |