From: Logan Capaldo Date: 2006-09-25T02:37:12+09:00 Subject: Re: NoMethodError On Sun, Sep 24, 2006 at 03:10:06PM +0900, gpasley@gmail.com wrote: > I am trying to validate the uniqueness of a field: [ snip ] > However, if I take validates_uniqueness_of off, i.e.: > > class Department < ActiveRecord::Base > belongs_to :company > belongs_to :region > has_many :employees > #validates_uniqueness_of :dept_name > end > > everything works just fine. What am I doing wrong? > Well first, you are posting to the wrong mailing list ;). You want the Rails mailing list for this question. Second, I'm guessing that the table column isn't actually dept_name (maybe a typo, dep_name, maybe you actually spelled it out department_name, who knows). But that's just a guess. I would suggest asking your question again on the rails list.