diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-12-10 17:44:06 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-12-11 18:02:09 +0100 |
commit | 64bfd9d71a4017e0b5336a2c1565926f4b8beedd (patch) | |
tree | 8b7770af4cf0e54db3ada26550af9cbda4eabbb0 /app/models/project.rb | |
parent | 8cdd54cc0696b76daa2baf463d02d944b50bac6a (diff) | |
download | gitlab-ce-64bfd9d71a4017e0b5336a2c1565926f4b8beedd.tar.gz |
Remove ci_ prefix from all ci related things
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index a11bc9c4bd5..ba04470c64e 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -128,15 +128,15 @@ class Project < ActiveRecord::Base has_one :import_data, dependent: :destroy, class_name: "ProjectImportData" + has_many :commit_statuses, dependent: :destroy, class_name: 'CommitStatus', foreign_key: :gl_project_id has_many :ci_commits, dependent: :destroy, class_name: 'Ci::Commit', foreign_key: :gl_project_id - has_many :ci_statuses, dependent: :destroy, class_name: 'CommitStatus', foreign_key: :gl_project_id - has_many :ci_builds, class_name: 'Ci::Build', foreign_key: :gl_project_id # the builds are created from the ci_statuses - has_many :ci_runner_projects, dependent: :destroy, class_name: 'Ci::RunnerProject', foreign_key: :gl_project_id - has_many :ci_runners, through: :ci_runner_projects, source: :runner, class_name: 'Ci::Runner' - has_many :ci_variables, dependent: :destroy, class_name: 'Ci::Variable', foreign_key: :gl_project_id - has_many :ci_triggers, dependent: :destroy, class_name: 'Ci::Trigger', foreign_key: :gl_project_id + has_many :builds, class_name: 'Ci::Build', foreign_key: :gl_project_id # the builds are created from the commit_statuses + has_many :runner_projects, dependent: :destroy, class_name: 'Ci::RunnerProject', foreign_key: :gl_project_id + has_many :runners, through: :runner_projects, source: :runner, class_name: 'Ci::Runner' + has_many :variables, dependent: :destroy, class_name: 'Ci::Variable', foreign_key: :gl_project_id + has_many :triggers, dependent: :destroy, class_name: 'Ci::Trigger', foreign_key: :gl_project_id - accepts_nested_attributes_for :ci_variables, allow_destroy: true + accepts_nested_attributes_for :variables, allow_destroy: true delegate :name, to: :owner, allow_nil: true, prefix: true delegate :members, to: :team, prefix: true @@ -822,7 +822,7 @@ class Project < ActiveRecord::Base end def any_runners?(&block) - if ci_runners.active.any?(&block) + if runners.active.any?(&block) return true end |