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:
parent
57693d1362
commit
9a6e3ae763
1 changed files with 2 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue