From aaa986c0d20d8df6ca46ff28d52c6c807035608d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Fri, 20 Jan 2017 20:07:29 +0100 Subject: Don't define ApplicationSetting defaults in a constant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- lib/gitlab/current_settings.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/gitlab/current_settings.rb b/lib/gitlab/current_settings.rb index c79e17b57ee..e20f5f6f514 100644 --- a/lib/gitlab/current_settings.rb +++ b/lib/gitlab/current_settings.rb @@ -30,15 +30,15 @@ module Gitlab end def in_memory_application_settings - @in_memory_application_settings ||= ApplicationSetting.new(ApplicationSetting::DEFAULTS) + @in_memory_application_settings ||= ::ApplicationSetting.new(::ApplicationSetting.defaults) # In case migrations the application_settings table is not created yet, # we fallback to a simple OpenStruct - rescue ActiveRecord::StatementInvalid + rescue ActiveRecord::StatementInvalid, ActiveRecord::UnknownAttributeError fake_application_settings end def fake_application_settings - OpenStruct.new(ApplicationSetting::DEFAULTS) + OpenStruct.new(::ApplicationSetting.defaults) end private -- cgit v1.2.1