Validates_associated questions


#1

I’m trying to validate a User model object that belongs_to a company

class User < ActiveRecord::Base

belongs_to :company
validates_associated :company, :message=>"Company can not be blank"

end

Now, if my Company class has the following:

validates_presence_of :name

shouldn’t that result in the error message beign added to the error
messages for the user??