[skip ci] Add information about #link_to target option

This commit is contained in:
Anton Davydov 2015-04-01 18:32:55 +03:00
parent dd39c96f59
commit fd9d7312a3

@ -172,6 +172,12 @@ def _back_url # :nodoc:
#
# link_to "Visit Other Site", "http://www.rubyonrails.org/", data: { confirm: "Are you sure?" }
# # => <a href="http://www.rubyonrails.org/" data-confirm="Are you sure?">Visit Other Site</a>
#
# Also you can set target attribute with <tt>target</tt> options:
#
# link_to "External link", "http://www.rubyonrails.org/", target: "_blank"
# # => <a href="http://www.rubyonrails.org/" target="_blank">External link</a>
#
def link_to(name = nil, options = nil, html_options = nil, &block)
html_options, options, name = options, name, block if block_given?
options ||= {}