FEATURE: Display trust level descriptions in site settings (#6421)

This commit is contained in:
David Taylor 2018-09-21 15:10:38 +01:00 committed by GitHub
parent 5407036ef9
commit 84f5448a92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -8,7 +8,8 @@ class TrustLevelSetting < EnumSiteSetting
end
def self.values
@values ||= valid_values.map { |x| { name: x.to_s, value: x } }
levels = TrustLevel.all
@values ||= valid_values.map { |x| { name: "#{x}: #{levels[x.to_i].name}", value: x } }
end
def self.valid_values