Browse files

Merge pull request #9557 from bonsaiben/useless_gsub

Change useless gsub to delete
  • Loading branch information...
2 parents 57c516f + c614711 commit ee444697073b123bbf0e36511b581f7df7419636 @carlosantoniodasilva carlosantoniodasilva committed Mar 5, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_view/helpers/form_tag_helper.rb
View
2 actionpack/lib/action_view/helpers/form_tag_helper.rb
@@ -778,7 +778,7 @@ def form_tag_in_block(html_options, &block)
# 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

0 comments on commit ee44469

Please sign in to comment.