From 6ddd6dedb1257c9c8c3350b25107ad933ed3a939 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Fri, 20 Dec 2024 16:10:40 +0300 Subject: [PATCH] Remove code that added now-unused field_with_errors css class --- config/initializers/field_error.rb | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 config/initializers/field_error.rb diff --git a/config/initializers/field_error.rb b/config/initializers/field_error.rb deleted file mode 100644 index 34b224296c..0000000000 --- a/config/initializers/field_error.rb +++ /dev/null @@ -1,9 +0,0 @@ -ActionView::Base.field_error_proc = proc do |html_tag, _instance| - class_attr_index = html_tag.index 'class="' - - if class_attr_index - html_tag.insert class_attr_index + 7, "field_with_errors " - else - html_tag.insert html_tag.index(%r{/?>}), ' class="field_with_errors"'.html_safe - end -end