From 40e6f437e8197f9fa5ad6c9ce87c9ec062b889bf Mon Sep 17 00:00:00 2001 From: Josh Date: Mon, 20 Jun 2011 22:17:53 -0700 Subject: Allow additional link relations when using method attribute with link_to --- actionpack/lib/action_view/helpers/url_helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_view/helpers/url_helper.rb') diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb index 489b96856d..8cb22df280 100644 --- a/actionpack/lib/action_view/helpers/url_helper.rb +++ b/actionpack/lib/action_view/helpers/url_helper.rb @@ -619,7 +619,9 @@ module ActionView end def add_method_to_attributes!(html_options, method) - html_options["rel"] = "nofollow" if method.to_s.downcase != "get" + if method && method.to_s.downcase != "get" + html_options["rel"] = "#{html_options["rel"].to_s} nofollow".split(" ").uniq.join(" ") + end html_options["data-method"] = method end -- cgit v1.2.3