You don't need to edit any files, create a file with this code and
place it under you app initilizers folder.

-
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en)



On Mon, Mar 2, 2009 at 3:25 PM, Fresh Mix
<[email protected]> wrote:
>
> What file I must to edit?
>
>
> 7.1. Changing the way form fields with errors are displayed
> http://guides.rubyonrails.org/activerecord_validations_callbacks.html
>
> ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
>  if instance.error_message.kind_of?(Array)
>    %(#{html_tag}<span class='validation-error'>&nbsp;
>      #{instance.error_message.join(',')}</span>)
>  else
>    %(#{html_tag}<span class='validation-error'>&nbsp;
>      #{instance.error_message}</span>)
>  end
> end
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to