Class: DigestEmailSiteSetting
- Inherits:
-
EnumSiteSetting
- Object
- EnumSiteSetting
- DigestEmailSiteSetting
- Defined in:
- app/models/digest_email_site_setting.rb
Class Method Summary collapse
Class Method Details
.translate_names? ⇒ Boolean
20 21 22 |
# File 'app/models/digest_email_site_setting.rb', line 20 def self.translate_names? true end |
.valid_value?(val) ⇒ Boolean
4 5 6 |
# File 'app/models/digest_email_site_setting.rb', line 4 def self.valid_value?(val) val.to_i.to_s == val.to_s && values.any? { |v| v[:value] == val.to_i } end |
.values ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/models/digest_email_site_setting.rb', line 8 def self.values @values ||= [ { name: "never", value: 0 }, { name: "every_30_minutes", value: 30 }, { name: "every_hour", value: 60 }, { name: "daily", value: 1440 }, { name: "weekly", value: 10_080 }, { name: "every_month", value: 43_200 }, { name: "every_six_months", value: 259_200 }, ] end |