From: gpasley@... Date: 2006-09-24T15:10:06+09:00 Subject: NoMethodError I am trying to validate the uniqueness of a field: class Department < ActiveRecord::Base belongs_to :company belongs_to :region has_many :employees validates_presence_of :dept_name end When I run it, I get this error message: NoMethodError in Department#create Showing app/views/department/_form.rhtml where line #34 raised: You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occured while evaluating nil.each Extracted source (around line #34): 31: <% if @page_title == "New Department" %> 32: