mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Plugins can register providers for global settings
This commit is contained in:
@@ -145,14 +145,14 @@ class GlobalSetting
|
||||
attr_accessor :provider
|
||||
end
|
||||
|
||||
|
||||
if Rails.env == "test"
|
||||
@provider = BlankProvider.new
|
||||
else
|
||||
@provider =
|
||||
FileProvider.from(File.expand_path('../../../config/discourse.conf', __FILE__)) ||
|
||||
EnvProvider.new
|
||||
def self.configure!
|
||||
if Rails.env == "test"
|
||||
@provider = BlankProvider.new
|
||||
else
|
||||
@provider =
|
||||
FileProvider.from(File.expand_path('../../../config/discourse.conf', __FILE__)) ||
|
||||
EnvProvider.new
|
||||
end
|
||||
end
|
||||
|
||||
load_defaults
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user