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. Employees -------- id (pk) name type -- this is for single table inheritance... ie supervisor, manager, minion employee_id -- (fk's to employees.id) this is the id of the employee's boss 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?
on 2006-04-18 18:00