From 87b548ccac8fd9b384a024a1374a2474e7c4d604 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Thu, 23 Jun 2011 00:35:54 -0300 Subject: Minor refactor --- actionpack/lib/action_view/helpers/url_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb index 8cb22df280..4a411caabc 100644 --- a/actionpack/lib/action_view/helpers/url_helper.rb +++ b/actionpack/lib/action_view/helpers/url_helper.rb @@ -619,8 +619,8 @@ module ActionView end def add_method_to_attributes!(html_options, method) - if method && method.to_s.downcase != "get" - html_options["rel"] = "#{html_options["rel"].to_s} nofollow".split(" ").uniq.join(" ") + if method && method.to_s.downcase != "get" && html_options["rel"] !~ /nofollow/ + html_options["rel"] = "#{html_options["rel"]} nofollow".strip end html_options["data-method"] = method end -- cgit v1.2.3