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
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-01-20 22:07:29 +0300
committerRémy Coutable <remy@rymai.me>2017-01-20 22:10:15 +0300
commitaaa986c0d20d8df6ca46ff28d52c6c807035608d (patch)
tree23a1120d6bbdf2e3db297bf566165077f53dc615 /lib/gitlab/current_settings.rb
parentff75bd0409f79c8b75cf49a219cfe3257526042d (diff)
Don't define ApplicationSetting defaults in a constant
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/gitlab/current_settings.rb')
-rw-r--r--lib/gitlab/current_settings.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/current_settings.rb b/lib/gitlab/current_settings.rb
index c79e17b57ee..e20f5f6f514 100644
--- a/lib/gitlab/current_settings.rb
+++ b/lib/gitlab/current_settings.rb
@@ -30,15 +30,15 @@ module Gitlab
end
def in_memory_application_settings
- @in_memory_application_settings ||= ApplicationSetting.new(ApplicationSetting::DEFAULTS)
+ @in_memory_application_settings ||= ::ApplicationSetting.new(::ApplicationSetting.defaults)
# In case migrations the application_settings table is not created yet,
# we fallback to a simple OpenStruct
- rescue ActiveRecord::StatementInvalid
+ rescue ActiveRecord::StatementInvalid, ActiveRecord::UnknownAttributeError
fake_application_settings
end
def fake_application_settings
- OpenStruct.new(ApplicationSetting::DEFAULTS)
+ OpenStruct.new(::ApplicationSetting.defaults)
end
private