Created
May 9, 2012 15:59
-
-
Save antonversal/2645895 to your computer and use it in GitHub Desktop.
This file contains 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 Account < ActiveRecord::Base | |
has_may :piece_of_works | |
# some code | |
end | |
class Customer < Account | |
has_many :projects | |
end | |
class Supplier < Account | |
has_many :jobs | |
end | |
class PieceOfWork < ActiveRecord::Base | |
belongs_to :account | |
end | |
class Project < PieceOfWork | |
belongs_to :customer | |
end | |
class Job < PieceOfWork | |
belongs_to :supplier | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment