Displaying 1 result from an estimated 1 matches for "supv".
Did you mean:
sup
2006 May 30
0
Single table lookups
I''m struggling with a single table type (self) lookup.
my ''personnel'' model has a supervisor_id and is_supervisor column.
The supervisor''s select list is created by
@supv = Personnel.find(:all,
:conditions => ["is_supervisor = true"],
:order => ''last_name'')
in my personnel model, I have the following...
def supervisor
if Personnel.find_by_id(self.supervisor_id) == nil then
Personnel.find_by_id(self.id).suwholenam...