From 2c06db67a99016fc6b7e6b08f0ed0404f74acffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Mon, 14 Sep 2015 10:48:24 +0200 Subject: [PATCH] fix the build --- app/models/auto_track_duration_site_setting.rb | 1 + app/models/digest_email_site_setting.rb | 1 + app/models/new_topic_duration_site_setting.rb | 1 + app/models/trust_level_setting.rb | 1 + 4 files changed, 4 insertions(+) diff --git a/app/models/auto_track_duration_site_setting.rb b/app/models/auto_track_duration_site_setting.rb index ce4c7b68789..b40ff6e0eb7 100644 --- a/app/models/auto_track_duration_site_setting.rb +++ b/app/models/auto_track_duration_site_setting.rb @@ -3,6 +3,7 @@ require_dependency 'enum_site_setting' class AutoTrackDurationSiteSetting < EnumSiteSetting def self.valid_value?(val) + val.to_i.to_s == val.to_s && values.any? { |v| v[:value] == val.to_i } end diff --git a/app/models/digest_email_site_setting.rb b/app/models/digest_email_site_setting.rb index 5d0d40635a2..5276fe3b3eb 100644 --- a/app/models/digest_email_site_setting.rb +++ b/app/models/digest_email_site_setting.rb @@ -3,6 +3,7 @@ require_dependency 'enum_site_setting' class DigestEmailSiteSetting < EnumSiteSetting def self.valid_value?(val) + val.to_i.to_s == val.to_s && values.any? { |v| v[:value] == val.to_i } end diff --git a/app/models/new_topic_duration_site_setting.rb b/app/models/new_topic_duration_site_setting.rb index f04b9e67e5a..ccc091a8b66 100644 --- a/app/models/new_topic_duration_site_setting.rb +++ b/app/models/new_topic_duration_site_setting.rb @@ -3,6 +3,7 @@ require_dependency 'enum_site_setting' class NewTopicDurationSiteSetting < EnumSiteSetting def self.valid_value?(val) + val.to_i.to_s == val.to_s && values.any? { |v| v[:value] == val.to_i } end diff --git a/app/models/trust_level_setting.rb b/app/models/trust_level_setting.rb index 4b3e5d42e66..9ea838ad826 100644 --- a/app/models/trust_level_setting.rb +++ b/app/models/trust_level_setting.rb @@ -3,6 +3,7 @@ require_dependency 'enum_site_setting' class TrustLevelSetting < EnumSiteSetting def self.valid_value?(val) + val.to_i.to_s == val.to_s && valid_values.any? { |v| v == val.to_i } end