undefined method & has_one

Ryan
Wed, 01 Nov 2006 21:32:51 -0000

i''ve got 3 tables:

here are the models

class Category < ActiveRecord::Base	#category.rb
	has_many	:employees
end


class Employee < ActiveRecord::Base	#employee.rb
	belongs_to	:category
	has_one		:bio
end


class Bio < ActiveRecord::Base		#bio.rb
	belongs_to	:employee
end


i''m trying to get a recordset of all the bios in a view using:

@category.employees.bio each do |bio|

... but i am getting "undefined method `bio'' for
Employee:Class"



@category.employees does return a valid recordset



Any ideas?


Thanks!