When a validates_asssociated fails... I get something like Address is invalid is there a way, preferably on a per-association basis to have the error messaage include the actual error like Zipcode is too long (max is 10 characters) _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On Tuesday 17 May 2005 06:33, Sean T Allen wrote:> is there a way, preferably on a per-association basis to have the > error messaage include > the actual error like > > Zipcode is too long (max is 10 characters)You''d have to do it yourself. See http://wiki.rubyonrails.com/rails/show/HowtoChangeValidationErrorDisplay for a start. Michael -- Michael Schuerig Nothing is as brilliantly adaptive mailto:michael-q5aiKMLteq4b1SvskN2V4Q@public.gmane.org as selective stupidity. http://www.schuerig.de/michael/ --A.O. Rorty, The Deceptive Self
On Tuesday 17 May 2005 16:43, Sean T Allen wrote:> Basically if from looking at the code and everything... the best > place would be in error_messages_for no?Yes, I think so. Michael -- Michael Schuerig Nothing is as brilliantly adaptive mailto:michael-q5aiKMLteq4b1SvskN2V4Q@public.gmane.org as selective stupidity. http://www.schuerig.de/michael/ --A.O. Rorty, The Deceptive Self
Michael Schuerig wrote:>On Tuesday 17 May 2005 06:33, Sean T Allen wrote: > > >>is there a way, preferably on a per-association basis to have the >>error messaage include >>the actual error like >> >>Zipcode is too long (max is 10 characters) >> >> > >You''d have to do it yourself. See > >http://wiki.rubyonrails.com/rails/show/HowtoChangeValidationErrorDisplay > >for a start. > >Michael > > >Basically if from looking at the code and everything... the best place would be in error_messages_for no? writing a new helper that digs down intot he associated item and pulls the error from it as the top level one would just have an :include error, correct? _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails