Permalink
Browse files

change useless gsub to delete

  • Loading branch information...
1 parent 40936da commit c6147113fabf64d58571e89d6661fe109aebc2b2 @bonsaiben bonsaiben committed Mar 5, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 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 c614711

Please sign in to comment.