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



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 }


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs