Welcome to mirror list, hosted at ThFree Co, Russian Federation.

application_setting.rb « ci « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0ea2452e39277597b6c6f632ba1fd59a23583a3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# == 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(
        all_broken_builds: Ci::Settings.gitlab_ci['all_broken_builds'],
        add_pusher: Ci::Settings.gitlab_ci['add_pusher'],
      )
    end
  end
end