Re: undefined method & has_one

Ryan
Wed, 01 Nov 2006 23:08:39 -0000

Jeff,

Thanks!  That does make sense, and I''ve been able to proceed a bit.
Although, in your example above: @bios = @category.employees.collect {
|employee| employee.bio }  returns Employee records that do not have
bios, evidenced by some bio records returning nil.


I thought I''d be able to call something like: @category.employees.bio
and get the appropriate information.

If only certain employees have bios,
and employees belongs to categories

... I wanted to see only certain bios belonging employees who belong to
1 category.

Am I approaching this incorrectly?