2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00
discourse/app/models/group.rb

16 lines
323 B
Ruby
Raw Normal View History

class Group < ActiveRecord::Base
has_many :category_groups
has_many :group_users
has_many :categories, through: :category_groups
has_many :users, through: :group_users
def self.builtin
Enum.new(:moderators, :admins, :trust_level_1, :trust_level_2)
end
def add(user)
self.users.push(user)
end
end