Undefined method `name' for #<Category:0x3820f70>


#1

All,
I am having a bit of trouble with the error. I hava a product and
category table and wanting to display the categories in a drop down
list. Below is the error I get. Any suggestion on how I can fix this.

undefined method `name’ for #Category:0x3652448

9:
10: <% @categories.each do |category| %>
11:
12: <%= category.name %>
13:
14: <% end %>
15:

Thanks

Patrick


#2

This may sound silly, but do you have a field named name in your
category table?