search for: articlecategory

Displaying 1 result from an estimated 1 matches for "articlecategory".

Did you mean: article_category
2006 Feb 11
1
Naming confusion
Hi, I have a database setup with 2 tables and a simple one-to-many relationship where article_categories have many articles. In the models ruby has created for me, I''ve added "belongs_to :article_category" to the Article class and "has_many :articles" to the ArticleCategory class. Everything seems fine until I try to reference the category from the article. In my view for example, I have "@article.article_category.name", but this throws an error.. ------ You have a nil object when you didn''t expect it! The error occured while evaluating nil.name...