Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEric Maziade <eric@spoutnik.co>2015-08-27 05:28:24 +0300
committerEric Maziade <eric@spoutnik.co>2015-08-28 04:21:31 +0300
commit23aee0ca8ad3de5697f770696f3e55fbfdba2be8 (patch)
tree416a4ed702fc98c7dbe8fba7b0af3989a47b76c1 /lib
parentde3b7d9c522db8d129a64f2b86297cf90413cb1e (diff)
fixed connection detection so settings can be read from the database
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/current_settings.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/current_settings.rb b/lib/gitlab/current_settings.rb
index 1a2a50a14d0..7ad3ed8728f 100644
--- a/lib/gitlab/current_settings.rb
+++ b/lib/gitlab/current_settings.rb
@@ -4,7 +4,7 @@ module Gitlab
key = :current_application_settings
RequestStore.store[key] ||= begin
- if ActiveRecord::Base.connected? && ActiveRecord::Base.connection.table_exists?('application_settings')
+ if ActiveRecord::Base.connection.active? && ActiveRecord::Base.connection.table_exists?('application_settings')
ApplicationSetting.current || ApplicationSetting.create_from_defaults
else
fake_application_settings