Created
October 24, 2016 15:04
-
-
Save Frank004/04177f9121dd14d5824008b9a447a6a8 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
User | |
belongs_to :company | |
Company | |
has_many :employees, class_name: "User" | |
has_many :clients, class_name: "User" | |
# ---- | |
companyA.clients.count | |
3 | |
companyA.employees.count | |
3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment