aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorStephen St. Martin <kuprishuz@gmail.com>2010-01-24 09:09:10 -0500
committerStefan Penner <stefan.penner@gmail.com>2010-01-27 12:44:33 -0600
commit9ad8d348b52e5603bb2432ee7fe326142ce5084b (patch)
tree569b81f1754d3896ed7b756183fe89b6a1aca171 /actionpack/lib
parent9f5cb3d3b48d0e7d702144d87208ac18778e3d38 (diff)
downloadrails-9ad8d348b52e5603bb2432ee7fe326142ce5084b.tar.gz
rails-9ad8d348b52e5603bb2432ee7fe326142ce5084b.tar.bz2
rails-9ad8d348b52e5603bb2432ee7fe326142ce5084b.zip
test :method option of link_to_remote, and ensure rel='nofollow' is added when :method => 'delete'
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_view/helpers/ajax_helper.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb
index 7d164929f0..06a57efd95 100644
--- a/actionpack/lib/action_view/helpers/ajax_helper.rb
+++ b/actionpack/lib/action_view/helpers/ajax_helper.rb
@@ -291,6 +291,7 @@ module ActionView
# :href => url_for(:action => "destroy", :id => post.id)
def link_to_remote(name, options, html_options = {})
attributes = {}
+ attributes.merge!(:rel => "nofollow") if options[:method] && options[:method].downcase == "delete"
attributes.merge!(extract_remote_attributes!(options))
attributes.merge!(html_options)