dont know how to use :include

Hi

i have two tables treatmentcategories and treatmentitems. each category has many items.

i have specified

has_many :treatmentitems in treatmentcategories.rb model and belongs_to :treatmentcategories in treatmentitems.rb model

in one of my def i am trying to display category with each item. So i used

@cats = Treatmentcategories.find(:all, :include => :treatmentitems)

but i am getting following error:

uninitialized constant Treatmentcategories::Treatmentitem

output i am looking for is:

cat1      item1      item2

cat2      item1

and so on

please advice

thanks in advance

Ajit

Ajit wrote:

belongs_to :treatmentcategories in treatmentitems.rb model

Should be belongs_to :treatmentcategory