search for: catalogue_no

Displaying 1 result from an estimated 1 matches for "catalogue_no".

2006 Jul 18
3
Newbie validation question
I am having problems with a validation, the full model code is below. The validate routine is attempting to see if another record with the same artist_name, title, & catalogue_no exists in the products table. If so, it should throw an error. This is the validation code: def validate if Product.find(:all, :conditions => ["artist_name = ?, title = ?, catalogue_no = ?", artist_name, title, catalogue_no]) errors.add(:title, "This title already exists...