Preventing fieldWithErrors from automatically being inserted

How do I prevent the fieldWithErrors div from automatically being
inserted into my html? I’d still like to use the error_messages_for
method.

Thanks

kb

found the answer after doing some googling.

just insert this piece of code to override the proc that inserts the
offending div.

put the code in environment.rb to do a global override. or put in a
controller to keep it local.

ActionView::Base.field_error_proc = proc { |input, instance| input }

thanks