Navjeet Chabbewal
2006-Jan-24 04:37 UTC
[Rails] Showing error messages for two models as one heading
I have two models Program and PointOfContact and here is their relationship Program belongs_to PointOfContact PointOfContact has one Program There is a single form to input a program and it''s associated point of contact information. The default behaviour in Rails seeems to be to show two different error messages (boxes) on the top of the form if there are validation errors in both models. Is there anyway to override that to show just one error message heading e.g. <heading>Program could not be saved because of errors</heading> <subError>Program name is blank.</subError> <subError>Point of Contact phone number is blank.</subError> Thanks. --Jeet -- Posted via http://www.ruby-forum.com/.