From: Ken Fettig Date: 2005-09-12T13:06:32+09:00 Subject: Re: Ruby on Rails Question Thanks much!!!!! That worked!!! Now is there a way to get rid of or override the default message that it generates? ("1 error prohibited this user from being saved"). The error that I want to display is actually an invalid login error so the default message makes it confusing. "Barry" wrote in message news:1126247082.681012.143310@g44g2000cwa.googlegroups.com... > If you have access to the model object, then you can use the attribute > accessor obj.errors to add the message. > > For example, > > @user = User.new(params[:user]) > @user.errors.add(:name, 'Name cannot be left blank...') > > Barry > > Ken Fettig wrote: >> How do you add business logic errors to the ApplicationController instead >> of >> in the Model? (ie. errors.add_on_empty(["title", "body"]) >> errors.add_on_empty(["title", "body"])) The error I want to generate is >> tied >> to code that would be called within the ApplicationController and has >> nothing to do with the Model, but I would like it to appear along with >> the >> other errors in the View. >> >> Thanks >> >> Ken >> >> kenfettig@btinet.net >