Created
May 20, 2015 21:46
-
-
Save jakeboxer/36af0ac0ef04fcfadc1e 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
nakajima = dat("nakajima") | |
jake_teams = dat("jakeboxer").teams | |
orgs = nakajima.organizations.where(:id => jake_teams.map(&:organization_id)) | |
teams = [] | |
orgs.each do |org| | |
teams += org.visible_teams_for(nakajima).where(:id => jake_teams.map(&:id)) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment