From d6b82cd1325919ac3786f17391a06aa19ab17b6c Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Fri, 17 Nov 2023 18:56:53 +0100 Subject: [PATCH] Improve initializer template Suggest to use `Regexp#match?` instead of `string =~ Regexp` --- lib/generators/templates/client_side_validations/initializer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/generators/templates/client_side_validations/initializer.rb b/lib/generators/templates/client_side_validations/initializer.rb index d0481eef..285fccfe 100644 --- a/lib/generators/templates/client_side_validations/initializer.rb +++ b/lib/generators/templates/client_side_validations/initializer.rb @@ -16,7 +16,7 @@ # # # ActionView::Base.field_error_proc = proc do |html_tag, instance| -# if html_tag =~ /^