Turns out the code below does work -- I had a rouge FGCI process
lurking about.
Is it true that the server must be restarted if enviroment.rb changes?
On 28-Jul-05, at 8:24 PM, David Teare wrote:
> Hi all,
>
> I was trying to use this tutorial to customize the display of form
> errors:
>
> http://wiki.rubyonrails.com/rails/show/
> HowtoChangeValidationErrorDisplay
>
> But from what I can tell this code never gets called:
> ActionView::Base.field_error_proc = Proc.new do |html_tag,
> instance|
> logger.info("Rendering errors")
> msg = instance.error_message
> title = msg.kind_of?(Array) ? ''* '' +
msg.join("\n* ") : msg
> "<div class=\"fieldWithErrors\"
title=\"#{title}\">#
> {html_tag}</div>"
> end
>
> Has this changed? If so, where is this customized now? I simply
> want to prepend a red "*" beside each field that is in error.
>
> Thanks!
> --Dave.
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>