Created
May 5, 2015 07:09
-
-
Save MhdSyrwan/33c0d4e5ee89a083ad43 to your computer and use it in GitHub Desktop.
Many-2-Many
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 LoanProcess < ActiveRecord::Base | |
has_many :loan_process_item_types | |
has_many :item_type, through: :loan_process_item_types | |
end | |
class LoanProcessItemType < ActiveRecord::Base | |
belongs_to :assembly | |
belongs_to :part | |
end | |
class ItemType < ActiveRecord::Base | |
has_many :loan_process_item_types | |
has_many :loan_processes, through: :loan_process_item_types | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment