ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button
  Rolling with Ruby on Rails
Subject:   Great article, but one question
Date:   2005-10-26 22:12:46
From:   terry.sasaki
This is an awesome article as well as Ruby on Rails.
Finally I got into this.

BTW, in regards to Fig.49 and 50.
My understainding is it implies recipes-categories relationship is many-to-one relationship in the form of classes, not tables.
So, I modified the code a bit by using class names:

class Recipe < ActiveRecord::Base
belongs_to :category


class Category < ActiveRecord::Base
has_many :recipe #not 'recipes'

This works as well.
I'm a bit confused with class and table names.
Can anybody give me any suggestion?

1 to 1 of 1
  1. Curt Hibbs photo Great article, but one question
    2005-10-27 03:49:20  Curt Hibbs | O'Reilly AuthorO'Reilly Blogger [View]

    • Great article, but one question
      2005-10-27 16:41:20  terry.sasaki [View]

1 to 1 of 1