[Rails] ActiveRecord
Neha
nehanarayanan at yahoo.com
Sun Jul 30 08:37:11 GMT 2006
Need to code a model for an order, customer and products to allow
---
A customer has many orders and orders are comprised of many products.
class Customer < ActiveRecord::Base
has_many :orders
end
class Product < ActiveRecord::Base
belongs_to :orders
end
class Order < ActiveRecord::Base
belongs_to :customers
has_many :products
end
is this code correct?
--
Posted via http://www.ruby-forum.com/.
More information about the Rails
mailing list