]> git.openstreetmap.org Git - rails.git/blobdiff - config/initializers/field_error.rb
Change Where am I to Where is this on left sidebar
[rails.git] / config / initializers / field_error.rb
index 6ddacda96e0dd817e48a37623b2b8cf829f6be9a..a3e3d3aaceb3a25845a8763bfbee8d4630e9d636 100644 (file)
@@ -2,8 +2,8 @@ ActionView::Base.field_error_proc = proc do |html_tag, _instance|
   class_attr_index = html_tag.index 'class="'
 
   if class_attr_index
   class_attr_index = html_tag.index 'class="'
 
   if class_attr_index
-    html_tag.insert class_attr_index + 7, 'field_with_errors '
+    html_tag.insert class_attr_index + 7, "field_with_errors "
   else
   else
-    html_tag.insert html_tag.index(/\/?>/), ' class="field_with_errors"'
+    html_tag.insert html_tag.index(%r{/?>}), ' class="field_with_errors"'
   end
 end
   end
 end