mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-04 12:51:41 -05:00
23 lines
587 B
Ruby
23 lines
587 B
Ruby
class CategoryGroup < ActiveRecord::Base
|
|
belongs_to :category
|
|
belongs_to :group
|
|
|
|
delegate :name, to: :group, prefix: true
|
|
|
|
def self.permission_types
|
|
@permission_types ||= Enum.new(:full, :create_post, :readonly)
|
|
end
|
|
|
|
end
|
|
|
|
# == Schema Information
|
|
#
|
|
# Table name: category_groups
|
|
#
|
|
# id :integer not null, primary key
|
|
# category_id :integer not null
|
|
# group_id :integer not null
|
|
# created_at :datetime not null
|
|
# updated_at :datetime not null
|
|
# permission_type :integer default(1)
|
|
#
|