Overriding <div class="fieldWithErrors">

It needs a little tweak to make this work on rails 3, since it now protects all strings against XSS attacks(i.e. html escapes them).

The following works: ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|   '<span class="field_with_errors">'.html_safe << html_tag << '</span>'.html_safe end

Obs.: dunno if there isn't a better way of doing this on rails 3.

Marcel Molina Jr. wrote: