Recursive Tables + a single table inheritance Q

Hi, what is the RoR way of handling a recursive table? I’m a little
confused how to set this up in the model.

My example is the employee table. Employees holds a list of employees,
and a recursive link to itself to show org structure.


id (pk)
type – this is for single table inheritance… ie supervisor, manager,
employee_id – (fk’s to this is the id of the employee’s

Also, I’m setting this up using single table inheritance. If I wanted a
different view for each “type” would I set up a completely different
View? Could I use a different layout for each?

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