I'm a little rusty on AR at the moment, but I think it looks something like this: In the controller: if @user.valid? # everything is fine else # ops! @user.errors contains the errors end
//Magnus Holm On Wed, May 20, 2009 at 19:43, David Susco <dsu...@gmail.com> wrote: > Can ActiveRecord::Validations::ClassMethods be used to provide > feedback to the user? I noticed the tepee example uses > "validates_uniqueness_of ". If the title isn't unique however nothing > is written and the user is never notified. > > Does anyone have an example or two of how I could go about informing > the user that the title they entered was not unique and they need to > enter another? > > -- > Dave > _______________________________________________ > Camping-list mailing list > Camping-list@rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list >
_______________________________________________ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list