mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-24 08:09:13 -05:00
19 lines
395 B
Ruby
19 lines
395 B
Ruby
# TODO all enums should probably move out of models
|
|
# TODO we should be able to do this kind of stuff without a backing class
|
|
require_dependency 'enum_site_setting'
|
|
|
|
class CategoryStyleSetting < EnumSiteSetting
|
|
|
|
VALUES = ["bar", "box", "bullet"]
|
|
|
|
def self.valid_value?(val)
|
|
VALUES.include?(val)
|
|
end
|
|
|
|
def self.values
|
|
VALUES.map do |l|
|
|
{name: l, value: l}
|
|
end
|
|
end
|
|
|
|
end
|