application_setting.rb 593 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
# == 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(
Valery Sizov's avatar
Valery Sizov committed
22 23
        all_broken_builds: Settings.gitlab_ci['all_broken_builds'],
        add_pusher: Settings.gitlab_ci['add_pusher'],
24 25 26 27
      )
    end
  end
end