# class Group

### Public Class Methods

search(query) click to toggle source

    # File app/models/group.rb, line 13
    def self.search query
      where("name LIKE :query OR code LIKE :query", query: "%#{query}%")
    end

### Public Instance Methods

to_param() click to toggle source

    # File app/models/group.rb, line 17
    def to_param
      code
    end

users() click to toggle source

    # File app/models/group.rb, line 21
    def users
      User.joins(:users_projects).where(users_projects: {project_id: project_ids}).uniq
    end