2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-05-21 09:17:54 -04:00
|
|
|
class MailingListModeSiteSetting < EnumSiteSetting
|
|
|
|
def self.valid_value?(val)
|
|
|
|
val.to_i.to_s == val.to_s &&
|
|
|
|
values.any? { |v| v[:value] == val.to_i }
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.values
|
|
|
|
@values ||= [
|
2016-10-05 19:28:58 -04:00
|
|
|
{ name: 'user.mailing_list_mode.individual', value: 1 },
|
|
|
|
{ name: 'user.mailing_list_mode.individual_no_echo', value: 2 }
|
2016-05-21 09:17:54 -04:00
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.translate_names?
|
|
|
|
true
|
|
|
|
end
|
|
|
|
end
|