diff options
author | Josh <jdeseno@gmail.com> | 2011-06-20 22:17:53 -0700 |
---|---|---|
committer | Josh <jdeseno@gmail.com> | 2011-06-20 22:17:53 -0700 |
commit | 40e6f437e8197f9fa5ad6c9ce87c9ec062b889bf (patch) | |
tree | 0ef80b1006b434ee0829a840026528d5fbc978d6 /actionpack | |
parent | 8a889dd45e088014c77f4cd799c9e5ddea0b54c6 (diff) | |
download | rails-40e6f437e8197f9fa5ad6c9ce87c9ec062b889bf.tar.gz rails-40e6f437e8197f9fa5ad6c9ce87c9ec062b889bf.tar.bz2 rails-40e6f437e8197f9fa5ad6c9ce87c9ec062b889bf.zip |
Allow additional link relations when using method attribute with link_to
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_view/helpers/url_helper.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb index 489b96856d..8cb22df280 100644 --- a/actionpack/lib/action_view/helpers/url_helper.rb +++ b/actionpack/lib/action_view/helpers/url_helper.rb @@ -619,7 +619,9 @@ module ActionView 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 |