Forum: Ruby on Rails validates_associated questions

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Rich B. (Guest)
on 2006-02-03 23:02
(Received via mailing list)
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"

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??
This topic is locked and can not be replied to.