I have an db table that associates two things from the same table.
So my ActiveRecord looks like:
class PeopleAltPerson < ActiveRecord::Base
belongs_to :altperson, :class_name => ‘Person’, :foreign_key =>
validates_presence_of :altperson # HERE?
validates_associated :altperson # HERE?
It’s the last two lines I’m asking about. Can the validates_associated
macro be used in this situation? i.e. where a table has two references
to the same table.