Last active
August 29, 2015 14:05
-
-
Save mattjstar/a9e3ccfec3b7f2d14dae to your computer and use it in GitHub Desktop.
Daniel Data Model
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 Item < ActiveRecord::Base | |
has_many :user_group_items | |
has_many :user_groups, through: :user_group_items | |
end | |
class UserGroup < ActiveRecord::Base | |
has_many :user_group_items | |
has_many :items, through: :user_group_items | |
end | |
class UserGroupItems < ActiveRecord::Base | |
belongs_to :user_group | |
belongs_to :item | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment