Skip to content
Snippets Groups Projects
Commit 16abacb1 authored by Robert Speicher's avatar Robert Speicher
Browse files

Merge branch 'huacnlee/current-settings-autoload-bug-in-development' into 'master'

Fix CurrentSettings autoload bug in development

_Originally opened at !2526 by @huacnlee._

- - -

In development env, when we changed any file hit Rails reload, it will failed with this message:

```
A copy of Gitlab::CurrentSettings has been removed from the module tree but is still active
```

See merge request !2753
parents cd478971 e4d27681
No related branches found
No related tags found
No related merge requests found
Loading
@@ -7,8 +7,8 @@ module Gitlab
Loading
@@ -7,8 +7,8 @@ module Gitlab
settings = nil settings = nil
   
if connect_to_db? if connect_to_db?
settings = ApplicationSetting.current settings = ::ApplicationSetting.current
settings ||= ApplicationSetting.create_from_defaults unless ActiveRecord::Migrator.needs_migration? settings ||= ::ApplicationSetting.create_from_defaults unless ActiveRecord::Migrator.needs_migration?
end end
   
settings || fake_application_settings settings || fake_application_settings
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment