I need to modelate a genealogical tree with:
animal,Dam(Mother) and Sire(Father)
the Dam and Sire are Animals then i modelate this:
class Animal < ActiveRecord::Base
validates_associated :sire, :dam
class Sire < Animal
class Dam < Animal
then when i save a new animal the validate doesnt work like this:
i have the table Animals
ID, Name Father MOther
1 A - -
2 B - -
when I insert a new record like this
insert(3,C,1,2) its ok!
insert(3,C,5,7) its ok too, (the validates is doesnt work)
how can i solve this??