mirror of
https://github.com/discourse/discourse.git
synced 2025-06-16 17:38:54 +08:00
Only refresh site settings once on initialization.
This commit is contained in:
@ -27,11 +27,6 @@ class SiteSetting < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# `current` hash is not populated everytime when load a site setting
|
|
||||||
# in order to support locale default. Instead, we simply `refresh!` once.
|
|
||||||
# This should only affects the spec in which you should populate `current`
|
|
||||||
refresh!
|
|
||||||
|
|
||||||
client_settings << :available_locales
|
client_settings << :available_locales
|
||||||
|
|
||||||
def self.available_locales
|
def self.available_locales
|
||||||
|
@ -59,9 +59,6 @@ Discourse::Application.configure do
|
|||||||
end
|
end
|
||||||
|
|
||||||
config.after_initialize do
|
config.after_initialize do
|
||||||
SiteSetting.defaults.set_regardless_of_locale(:port, 3000)
|
|
||||||
SiteSetting.refresh!
|
|
||||||
|
|
||||||
if ENV['BULLET']
|
if ENV['BULLET']
|
||||||
Bullet.enable = true
|
Bullet.enable = true
|
||||||
Bullet.rails_logger = true
|
Bullet.rails_logger = true
|
||||||
|
Reference in New Issue
Block a user