Commit 8133e449 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Hack for migrating to new settings

parent 57a65ede
begin
if ActiveRecord::Base.connection.table_exists?('application_settings')
unless ApplicationSetting.any?
ApplicationSetting.create(
default_projects_limit: Settings.gitlab['default_projects_limit'],
......@@ -8,5 +8,4 @@ begin
sign_in_text: Settings.extra['sign_in_text'],
)
end
rescue
end
module Gitlab
module CurrentSettings
def current_application_settings
if ActiveRecord::Base.connection.table_exists?('application_settings')
ApplicationSetting.current
else
OpenStruct.new(
default_projects_limit: Settings.gitlab['default_projects_limit'],
signup_enabled: Settings.gitlab['signup_enabled'],
signin_enabled: Settings.gitlab['signin_enabled'],
gravatar_enabled: Settings.gravatar['enabled'],
sign_in_text: Settings.extra['sign_in_text'],
)
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment