module ActionView::Helpers::UrlHelper
Public Instance Methods
link_to_blank(*args, &block)
click to toggle source
# File lib/action_view/link_to_blank/link_to_blank.rb, line 5 def link_to_blank(*args, &block) if block_given? options = args.first || {} html_options = args.second || {} link_to_blank(capture(&block), options, html_options) else name = args[0] options = args[1] || {} html_options = args[2] || {} # override html_options.reverse_merge! target: '_blank' link_to(name, options, html_options) end end
link_to_blank_if(condition, name, options = {}, html_options = {}, &block)
click to toggle source
# File lib/action_view/link_to_blank/link_to_blank.rb, line 34 def link_to_blank_if(condition, name, options = {}, html_options = {}, &block) link_to_blank_unless !condition, name, options, html_options, &block end
link_to_blank_unless(condition, name, options = {}, html_options = {}, &block)
click to toggle source
# File lib/action_view/link_to_blank/link_to_blank.rb, line 22 def link_to_blank_unless(condition, name, options = {}, html_options = {}, &block) if condition if block_given? block.arity <= 1 ? capture(name, &block) : capture(name, options, html_options, &block) else ERB::Util.html_escape(name) end else link_to_blank(name, options, html_options) end end
link_to_blank_unless_current(name, options = {}, html_options = {}, &block)
click to toggle source
# File lib/action_view/link_to_blank/link_to_blank.rb, line 38 def link_to_blank_unless_current(name, options = {}, html_options = {}, &block) link_to_blank_unless current_page?(options), name, options, html_options, &block end