mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 10:05:24 +08:00
b58867b6e9
Includes support for flags, reviewable users and queued posts, with REST API backwards compatibility. Co-Authored-By: romanrizzi <romanalejandro@gmail.com> Co-Authored-By: jjaffeux <j.jaffeux@gmail.com>
19 lines
345 B
Ruby
19 lines
345 B
Ruby
require_dependency 'reviewable/collection'
|
|
|
|
class Reviewable < ActiveRecord::Base
|
|
class EditableFields < Reviewable::Collection
|
|
class Field < Item
|
|
attr_reader :type
|
|
|
|
def initialize(id, type)
|
|
super(id)
|
|
@type = type
|
|
end
|
|
end
|
|
|
|
def add(id, type)
|
|
@content << Field.new(id, type)
|
|
end
|
|
end
|
|
end
|