search for: article_categori

Displaying 2 results from an estimated 2 matches for "article_categori".

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...
2006 Jan 05
2
Rails Newb: Foreign Key Views?
...I can''t seem to find an answer for: What is the best way of coding views that represent foreign key relationships? For example, while developing, I''ve created an "articles" table. I create some scaffolding code and modify it all to look nice. I then realise, I need an article_categories related table. I make the change in the database, modify the models with the "belongs_to" and "has_many", but what is the best way to update my views (edit/new in particular)? I want to have a drop-down list when editing or creating an article that allows me to select a cate...