From d7698971713bf42efb12bac10fff0303d5a8ac4e Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Sun, 24 Jan 2010 12:57:19 -0500 Subject: modified helper that adds attributes for :method to include rel='nofollow' if :method => :delete, same as its remote_ equivalent --- actionpack/lib/action_view/helpers/javascript_helper.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb index ba6aefca26..ee6481b86d 100644 --- a/actionpack/lib/action_view/helpers/javascript_helper.rb +++ b/actionpack/lib/action_view/helpers/javascript_helper.rb @@ -215,6 +215,7 @@ module ActionView end def add_method_to_attributes!(html_options, method, url = nil) + html_options["rel"] = "nofollow" if method.to_s.downcase == "delete" html_options["data-method"] = method if url.size > 0 html_options["data-url"] = url -- cgit v1.2.3