Fix CurrentSettings autoload bug in development.

Error: A copy of Gitlab::CurrentSettings has been removed from the module tree but is still active
This commit is contained in:
Jason Lee 2016-01-21 16:01:13 +08:00 committed by Rémy Coutable
parent 9fdd605fd2
commit e4d276816a
1 changed files with 2 additions and 2 deletions

View File

@ -7,8 +7,8 @@ module Gitlab
settings = nil
if connect_to_db?
settings = ApplicationSetting.current
settings ||= ApplicationSetting.create_from_defaults unless ActiveRecord::Migrator.needs_migration?
settings = ::ApplicationSetting.current
settings ||= ::ApplicationSetting.create_from_defaults unless ActiveRecord::Migrator.needs_migration?
end
settings || fake_application_settings