Last active
January 25, 2017 23:13
-
-
Save mfifth/de154df87c618c9cda4b043e91d8c328 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 User < ActiveRecord::Base | |
has_many :groups, through: :group_users | |
end | |
class GroupUsers < ActiveRecord::Base | |
belongs_to :user | |
belongs_to :group | |
end | |
class Group < ActiveRecord::Base | |
has_many :users, through: :group_users | |
end |
kwerle
commented
Jan 25, 2017
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment