mirror of
https://github.com/discourse/discourse.git
synced 2024-12-16 04:33:48 +08:00
844467015d
clean up category badge styling
20 lines
385 B
Ruby
20 lines
385 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"]
|
|
|
|
def self.valid_value?(val)
|
|
VALUES.include?(val)
|
|
end
|
|
|
|
def self.values
|
|
VALUES.map do |l|
|
|
{name: l, value: l}
|
|
end
|
|
end
|
|
|
|
end
|