diff options
author | Nicolas Sanguinetti <contacto@nicolassanguinetti.info> | 2010-04-14 21:44:28 -0300 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-04-22 15:29:59 -0700 |
commit | d5d717161d853d8d7240da59b41a879bdac6e982 (patch) | |
tree | 109b43705e564e7fa20db763955f606dafddc4cf /actionpack/lib | |
parent | a8330c2006e90a6da8f621fdaf1156fa63b4049a (diff) | |
download | rails-d5d717161d853d8d7240da59b41a879bdac6e982.tar.gz rails-d5d717161d853d8d7240da59b41a879bdac6e982.tar.bz2 rails-d5d717161d853d8d7240da59b41a879bdac6e982.zip |
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 <wycats@gmail.com>
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/url_helper.rb | 4 |
1 files changed, 1 insertions, 3 deletions
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") |