From 9a6e3ae76322e0a8108f9bcf0a8440769328b9d7 Mon Sep 17 00:00:00 2001 From: yury Date: Tue, 24 Aug 2010 18:27:49 +0400 Subject: Remove unnecessary code from UrlHelper#link_to. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit convert_options_to_data_attributes always returns not nil stringified html_options [#5445 state:resolved] Signed-off-by: José Valim --- actionpack/lib/action_view/helpers/url_helper.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb index 56b38b57f4..853ec70392 100644 --- a/actionpack/lib/action_view/helpers/url_helper.rb +++ b/actionpack/lib/action_view/helpers/url_helper.rb @@ -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 = html_options['href'] + tag_options = tag_options(html_options) href_attr = "href=\"#{html_escape(url)}\"" unless href "#{html_escape(name || url)}".html_safe -- cgit v1.2.3