Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## In my provider model
- #Associations
- has_many :locations
- has_many :user_affiliations
- has_many :users, :through => :user_affiliations
- #Scopes
- scope :owners, user_affiliations.find_all_by_role("owner").users
Add Comment
Please, Sign In to add comment