Validates_associated questions

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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs