Sha256: 8d1ff3dedabc7b1b1054d9228d8f171444ae8673044711e6ef29bc2c3d1da14a

Contents?: true

Size: 335 Bytes

Versions: 2

Compression:

Stored size: 335 Bytes

Contents

require "link_out_to_helper/version"

module LinkOutToHelper
  def link_out_to(*args, &block)
    if block_given?
      args[1] = {:target => '_blank'}.merge(args[1] || {})
    else
      args[2] = {:target => '_blank'}.merge(args[2] || {})
    end
    link_to(*args, &block)
  end
end

ActionView::Base.send :include, LinkOutToHelper

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
link_out_to_helper-0.0.2 lib/link_out_to_helper.rb
link_out_to_helper-0.0.1 lib/link_out_to_helper.rb