Permalink
Browse files

Deal with Safari garbage and allow html_options

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@897 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 66ed733 commit 0f4ee4b810728fa5fd32cfe14501fc3d8eaf6051 @dhh dhh committed Mar 13, 2005
Showing with 4 additions and 4 deletions.
  1. +4 −4 actionpack/lib/action_view/helpers/javascript_helper.rb
@@ -24,8 +24,8 @@ def link_to_function(name, function, html_options = {})
# 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 @@ def define_javascript_functions
},
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 @@ def define_javascript_functions
req = xml_http_request_object();
req.open(type, url, async);
- req.send(parameters);
+ req.send(parameters ? parameters + "&_=" : parameters);
return req.responseText;
}

0 comments on commit 0f4ee4b

Please sign in to comment.