It is scope see members_controller.rb 
teams = Team.accessible(current_user).with_ids_or_names(team_ids.keys, team_names.keys)