Skip to content

Instantly share code, notes, and snippets.

@doubledare
Created October 13, 2009 16:33
Show Gist options
  • Save doubledare/209351 to your computer and use it in GitHub Desktop.
Save doubledare/209351 to your computer and use it in GitHub Desktop.
class User
has n, :team_users
has n, :teams, :through => :team_users
end
class Team
has n, :team_users
has n, :users, :through => :team_users
end
class TeamUser
belongs_to :team
belongs_to :user
property :team_id, Integer, :key => true
property :user_id, Integer, :key => true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment