2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-05 08:59:27 +08:00
discourse/app/models/category_group.rb

24 lines
587 B
Ruby
Raw Normal View History

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
2013-05-24 12:35:14 +10:00
# == 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)
2013-05-24 12:35:14 +10:00
#