I have a model called RsvpRegistrations with
belongs_to :rsvp
I need to use values from the parent 'rsvp' object in my validations such as
validates_presence_of :phone if self.rsvp.phone
(Rsvp.phone is boolean)
But this doesn't work. The error I get is undefined method `rsvp'. How can I access the parent object and its values?
Once I get it working, I have other similar validations to run, so I'm thinking I need to grab the parent 'rsvp' one time and then reference it in my other validations.
Thanks in advance.