From d5d717161d853d8d7240da59b41a879bdac6e982 Mon Sep 17 00:00:00 2001 From: Nicolas Sanguinetti Date: Wed, 14 Apr 2010 21:44:28 -0300 Subject: Allow :remote => false to be passed to link_to And add tests for `button_to` and `form_tag` which currently behave as expected, so we avoid a regression. Signed-off-by: wycats --- actionpack/lib/action_view/helpers/url_helper.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'actionpack/lib/action_view/helpers/url_helper.rb') diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb index 13a54b0c21..68efe8fc5f 100644 --- a/actionpack/lib/action_view/helpers/url_helper.rb +++ b/actionpack/lib/action_view/helpers/url_helper.rb @@ -596,10 +596,8 @@ module ActionView html_options = {} if html_options.nil? html_options = html_options.stringify_keys - if (options.is_a?(Hash) && options.key?('remote')) || (html_options.is_a?(Hash) && html_options.key?('remote')) + if (options.is_a?(Hash) && options.key?('remote') && options.delete('remote')) || (html_options.is_a?(Hash) && html_options.key?('remote') && html_options.delete('remote')) html_options['data-remote'] = 'true' - options.delete('remote') if options.is_a?(Hash) - html_options.delete('remote') if html_options.is_a?(Hash) end confirm = html_options.delete("confirm") -- cgit v1.2.3