console/app/models/member.rb
# return the items in the members array corresponding to the team grants this member has
return the items in the members array corresponding to the team grants this member has
return the items in the members array corresponding to the team grants this member has
def teams(members)
    team_ids = from.inject([]) {|ids, f| ids << f[:id] if f[:type] == 'team'; ids }
    if team_ids.present?
      members.select {|m| m.type == 'team' && team_ids.include?(m.id) }
    else
      []
    end
  end
def teams ( members ) team_ids = from . inject ( [ ] ) { | ids , f | ids << f [ :id ] if f [ :type ] == 'team' ; ids } if team_ids . present? members . select { | m | m . type == 'team' && team_ids . include? ( m . id ) } else [ ] end end
return the items in the members array corresponding to the team grants this member has
return the items in the members array corresponding to the team grants this member has
members
<not_specific>