diff options
author | Bob Remeika <bob.remeika@gmail.com> | 2009-09-23 01:05:45 -0700 |
---|---|---|
committer | Stefan Penner <stefan.penner@gmail.com> | 2010-01-27 12:44:30 -0600 |
commit | 773c4929fda3eff30e096813d25a61802638ab65 (patch) | |
tree | 96b7f151f90687b344dd8844fa8aea634fbfafd5 /actionpack/lib | |
parent | 23275d1b793c21ea9481383402a881c177e8111c (diff) | |
download | rails-773c4929fda3eff30e096813d25a61802638ab65.tar.gz rails-773c4929fda3eff30e096813d25a61802638ab65.tar.bz2 rails-773c4929fda3eff30e096813d25a61802638ab65.zip |
Implemented a fuller stub in AjaxTestCase for url_for because link_to calls url_for on all urls passed to it. Tests that were testing different input types for the url were failing because of this.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/ajax_helper.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 5cb8e96ae6..02245d9a1e 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -37,6 +37,12 @@ module ActionView attributes.merge!(extract_remote_attributes!(options)) attributes.merge!(options) + html["data-update-position"] = options.delete(:position) + html["data-method"] = options.delete(:method) + html["data-remote"] = "true" + + html.merge!(options) + url = url_for(url) if url.is_a?(Hash) link_to(name, url, attributes) end |