Hello there,
I used a screencast ( #16 Virtual Attributes - RailsCasts ) 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 S.