2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-01-03 12:03:01 -05:00
|
|
|
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
|