1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Minor refactor

This commit is contained in:
Santiago Pastorino 2011-06-23 00:35:54 -03:00
parent 22e86c10d8
commit 87b548ccac

View file

@ -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