From 0f4ee4b810728fa5fd32cfe14501fc3d8eaf6051 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 13 Mar 2005 18:06:58 +0000 Subject: Deal with Safari garbage and allow html_options git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@897 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/helpers/javascript_helper.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb index bd22ffb0c0..023d67fd48 100644 --- a/actionpack/lib/action_view/helpers/javascript_helper.rb +++ b/actionpack/lib/action_view/helpers/javascript_helper.rb @@ -24,8 +24,8 @@ module ActionView # Examples: # link_to_remote "Delete this post", :update => "posts", :url => { :action => "destroy", :id => post.id } # link_to_remote(image_tag("refresh"), :update => "emails", :url => { :action => "list_emails" }) - def link_to_remote(name, options = {}) - link_to_function(name, remote_function(options)) + def link_to_remote(name, options = {}, html_options = {}) + link_to_function(name, remote_function(options), html_options) end def form_remote_tag(options = {}) @@ -53,7 +53,7 @@ module ActionView }, present: function() { - for(i = 0; i < arguments.length; i++) { if (o(arguments[i]).value = '') { return false; } } + for(i = 0; i < arguments.length; i++) { if (o(arguments[i]).value == '') { return false; } } return true; } } @@ -76,7 +76,7 @@ module ActionView req = xml_http_request_object(); req.open(type, url, async); - req.send(parameters); + req.send(parameters ? parameters + "&_=" : parameters); return req.responseText; } -- cgit v1.2.3