Permalink
Browse files

Allow additional link relations when using method attribute with link_to

  • Loading branch information...
1 parent 8a889dd commit 40e6f437e8197f9fa5ad6c9ce87c9ec062b889bf @jdeseno jdeseno committed Jun 21, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 actionpack/lib/action_view/helpers/url_helper.rb
@@ -619,7 +619,9 @@ def link_to_remote_options?(options)
end
def add_method_to_attributes!(html_options, method)
- html_options["rel"] = "nofollow" if method.to_s.downcase != "get"
+ if method && method.to_s.downcase != "get"
+ html_options["rel"] = "#{html_options["rel"].to_s} nofollow".split(" ").uniq.join(" ")
+ end
html_options["data-method"] = method
end

0 comments on commit 40e6f43

Please sign in to comment.