aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorBenjamin Sullivan <bsullivan2@gmail.com>2013-03-05 17:32:37 +0900
committerBenjamin Sullivan <bsullivan2@gmail.com>2013-03-05 17:32:37 +0900
commitc6147113fabf64d58571e89d6661fe109aebc2b2 (patch)
treea6ecbe35dff2ac9f84fb10a7afde5aba8a4d9ffa /actionpack
parent40936da37222f3a669505b8e428062c4118ca30e (diff)
downloadrails-c6147113fabf64d58571e89d6661fe109aebc2b2.tar.gz
rails-c6147113fabf64d58571e89d6661fe109aebc2b2.tar.bz2
rails-c6147113fabf64d58571e89d6661fe109aebc2b2.zip
change useless gsub to delete
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/helpers/form_tag_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb
index 1adc8225f1..8abd5d6e9c 100644
--- a/actionpack/lib/action_view/helpers/form_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb
@@ -778,7 +778,7 @@ module ActionView
# see http://www.w3.org/TR/html4/types.html#type-name
def sanitize_to_id(name)
- name.to_s.gsub(']','').gsub(/[^-a-zA-Z0-9:.]/, "_")
+ name.to_s.delete(']').gsub(/[^-a-zA-Z0-9:.]/, "_")
end
end
end