2015-01-28 22:53:02 -05:00
|
|
|
# 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
|
|
|
|
|
2015-03-09 12:25:27 -04:00
|
|
|
VALUES = ["bar", "box", "bullet"]
|
2015-01-28 22:53:02 -05:00
|
|
|
|
|
|
|
def self.valid_value?(val)
|
|
|
|
VALUES.include?(val)
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.values
|
|
|
|
VALUES.map do |l|
|
|
|
|
{name: l, value: l}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|