mirror of
				https://github.com/discourse/discourse.git
				synced 2025-02-25 18:55:32 -06:00 
			
		
		
		
	FIX: Do not cache translated trust level names in site settings (#11863)
There's no real need to cache these, and the caching can introduce problems when different sites/users are using different locales.
This commit is contained in:
		@@ -9,7 +9,7 @@ class TrustLevelSetting < EnumSiteSetting
 | 
			
		||||
 | 
			
		||||
  def self.values
 | 
			
		||||
    levels = TrustLevel.all
 | 
			
		||||
    @values ||= valid_values.map { |x|
 | 
			
		||||
    valid_values.map { |x|
 | 
			
		||||
      {
 | 
			
		||||
        name: x.is_a?(Integer) ? "#{x}: #{levels[x.to_i].name}" : x,
 | 
			
		||||
        value: x
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user