# File app/models/group.rb, line 13 def self.search query where("name LIKE :query OR code LIKE :query", query: "%#{query}%") end
# File app/models/group.rb, line 17 def to_param code end
# File app/models/group.rb, line 21 def users User.joins(:users_projects).where(users_projects: {project_id: project_ids}).uniq end