diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-03-05 03:38:46 -0800 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-03-05 03:38:46 -0800 |
commit | ee444697073b123bbf0e36511b581f7df7419636 (patch) | |
tree | 278771a33dd8028b296e40a0e80fa1fccaeb30bf | |
parent | 57c516f77587ba032600968da52c1b279e18c8fa (diff) | |
parent | c6147113fabf64d58571e89d6661fe109aebc2b2 (diff) | |
download | rails-ee444697073b123bbf0e36511b581f7df7419636.tar.gz rails-ee444697073b123bbf0e36511b581f7df7419636.tar.bz2 rails-ee444697073b123bbf0e36511b581f7df7419636.zip |
Merge pull request #9557 from bonsaiben/useless_gsub
Change useless gsub to delete
-rw-r--r-- | actionpack/lib/action_view/helpers/form_tag_helper.rb | 2 |
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 |