1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove unnecessary code from UrlHelper#link_to.

convert_options_to_data_attributes always returns not nil stringified html_options [#5445 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
yury 2010-08-24 18:27:49 +04:00 committed by José Valim
parent 57693d1362
commit 9a6e3ae763

View file

@ -235,13 +235,8 @@ module ActionView
html_options = convert_options_to_data_attributes(options, html_options)
url = url_for(options)
if html_options
html_options = html_options.stringify_keys
href = html_options['href']
tag_options = tag_options(html_options)
else
tag_options = nil
end
href_attr = "href=\"#{html_escape(url)}\"" unless href
"<a #{href_attr}#{tag_options}>#{html_escape(name || url)}</a>".html_safe