Ok so i have a Contact model
class Contact < ActiveRecord::Base
has_one :profile
validates_presence_of :first_name
validates_presence_of :last_name
validates_presence_of :email
class Profile < ActiveRecord::Base
belongs_to :contact
And on my form i have fields from that profile and the contact and the validations for the contacts show up but i want to validate the fields from profile. I assumed that adding this to the controller would add to the error messages.
@contact.errors.add(:base, "Profile Company cant be blank")
ANy ideas
My form is a form_tag BTW and i cant change that for various reasons..