]> git.openstreetmap.org Git - rails.git/commitdiff
Remove code that added now-unused field_with_errors css class
authorAnton Khorev <tony29@yandex.ru>
Fri, 20 Dec 2024 13:10:40 +0000 (16:10 +0300)
committerAnton Khorev <tony29@yandex.ru>
Fri, 20 Dec 2024 13:10:40 +0000 (16:10 +0300)
config/initializers/field_error.rb [deleted file]

diff --git a/config/initializers/field_error.rb b/config/initializers/field_error.rb
deleted file mode 100644 (file)
index 34b2242..0000000
+++ /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