diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2011-06-23 00:35:54 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-06-23 00:35:54 -0300 |
commit | 87b548ccac8fd9b384a024a1374a2474e7c4d604 (patch) | |
tree | 6e5c684895c171d42979d21ac6ff7f31260516bc /actionpack/lib | |
parent | 22e86c10d8b0496df522d14eaef98ab9e7651f50 (diff) | |
download | rails-87b548ccac8fd9b384a024a1374a2474e7c4d604.tar.gz rails-87b548ccac8fd9b384a024a1374a2474e7c4d604.tar.bz2 rails-87b548ccac8fd9b384a024a1374a2474e7c4d604.zip |
Minor refactor
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/url_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb index 8cb22df280..4a411caabc 100644 --- a/actionpack/lib/action_view/helpers/url_helper.rb +++ b/actionpack/lib/action_view/helpers/url_helper.rb @@ -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 |