gitlab-org--gitlab-foss/app/models/ci/application_setting.rb

28 lines
593 B
Ruby
Raw Normal View History

2015-08-25 21:42:46 -04:00
# == Schema Information
#
# Table name: application_settings
#
# id :integer not null, primary key
# all_broken_builds :boolean
# add_pusher :boolean
# created_at :datetime
# updated_at :datetime
#
module Ci
class ApplicationSetting < ActiveRecord::Base
extend Ci::Model
def self.current
Ci::ApplicationSetting.last
end
def self.create_from_defaults
create(
2015-09-10 06:42:41 -04:00
all_broken_builds: Settings.gitlab_ci['all_broken_builds'],
add_pusher: Settings.gitlab_ci['add_pusher'],
2015-08-25 21:42:46 -04:00
)
end
end
end