mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Minor refactor
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user