Wes Gamble
2007-Mar-30 18:06 UTC
Rolling up validates_associated error messages into parent
All, I really dig using validates_associated on my models to automatically validate their associated objects. However, I find that I would prefer that the associated object''s error messages were propagated up to the original (object on which validate was called) object as they are, instead of the original object showing "X is invalid" where X is one of the associated objects. I''ve handled this "by hand" by massaging the errors array to remove "...is invalid" messages and pulling the full error messages off the associated objects and putting them on the original object. Does anyone have a more clever way/patch to do this? Any chance that this may become an option on validates_associated in the future? Thanks, Wes -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---