Created
June 22, 2009 20:11
-
-
Save bear454/134160 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person < ActiveRecord::Base | |
has_many :orders | |
has_many :lines, :through => :products | |
has_many :products, :through => :lines | |
end | |
class Order < ActiveRecord::Base | |
has_many :lines | |
has_many :products, :through => :lines | |
end | |
class Line < ActiveRecordd::Base | |
belongs_to :product | |
end | |
class Product < ActiveRecord::Base | |
has_many :lines | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment