fixed connection detection so settings can be read from the database

This commit is contained in:
Eric Maziade
2015-08-27 21:21:31 -04:00
parent de3b7d9c52
commit 23aee0ca8a
+1 -1
View File
@@ -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