aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/url_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/lib/action_view/helpers/url_helper.rb')
-rw-r--r--actionview/lib/action_view/helpers/url_helper.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionview/lib/action_view/helpers/url_helper.rb b/actionview/lib/action_view/helpers/url_helper.rb
index 4e436433c4..71fed39351 100644
--- a/actionview/lib/action_view/helpers/url_helper.rb
+++ b/actionview/lib/action_view/helpers/url_helper.rb
@@ -590,10 +590,10 @@ module ActionView
def add_method_to_attributes!(html_options, method)
if method && method.to_s.downcase != "get" && html_options["rel"] !~ /nofollow/
- if html_options.key?("rel")
- html_options["rel"] = "#{html_options["rel"]} nofollow".lstrip
- else
+ if html_options.("rel").blank?
html_options["rel"] = "nofollow"
+ else
+ html_options["rel"] = "#{html_options["rel"]} nofollow"
end
end
html_options["data-method"] = method