Hello there,

I used a screencast ( http://railscasts.com/episodes/16 ) to make a
Nested form.
The problem is that when I will show the error_messages_for I will just
get a single line of error for each element that is related with the
main element.

Codes are here:

http://pastie.org/359215 - Invoice.rb
http://pastie.org/359217 - InvoiceItem.rb
http://pastie.org/359218 - Controller.rb

Error looks like this:

6 errors prohibited this Invoice from being saved
There were problems with the following fields:
    * Invoice item is invalid
    * Invoice item is invalid
    * Invoice item is invalid
    * Invoice item is invalid
    * Invoice item is invalid
    * Invoice item is invalid

What I was expecting to receive was some thing like:

6 errors prohibited this Invoice from being saved
There were problems with the following fields:
    * Invoice item name can't be black
    * Invoice item price can't be black
    * Invoice item name is too short
    * Invoice item name can't be black
    * Invoice item name is too long
    * Invoice item price can't be black


Anyone has an idea how to fix it?

Tks,

David Sousa
-- 
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