diff options
author | Robert Speicher <robert@gitlab.com> | 2016-02-09 01:58:00 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-02-09 01:58:00 +0300 |
commit | 16abacb1f07c866e7a1f5deb6a6bc20a4eaee71c (patch) | |
tree | 0d700c622ed41188e2af68195c1f104d39d2421c | |
parent | cd47897180490b0d6d851b78f5c75525567d6684 (diff) | |
parent | e4d276816ab688b1f2af6842e71fe6bfc3036739 (diff) |
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
-rw-r--r-- | lib/gitlab/current_settings.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/current_settings.rb b/lib/gitlab/current_settings.rb index 8531c7e87e1..761b63e98f6 100644 --- a/lib/gitlab/current_settings.rb +++ b/lib/gitlab/current_settings.rb @@ -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 |