config/initializers/customize_input_error.rb in headmin-0.3.2 vs config/initializers/customize_input_error.rb in headmin-0.3.3
- old
+ new
@@ -1,9 +1,9 @@
-ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
+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, 'error '
+ html_tag.insert class_attr_index + 7, "error "
else
- html_tag.insert html_tag.index('>'), ' class="error"'
+ html_tag.insert html_tag.index(">"), ' class="error"'
end
-end
\ No newline at end of file
+end