mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Minor refactor
This commit is contained in:
parent
22e86c10d8
commit
87b548ccac
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue