diff options
author | Ben Bodenmiller <bbodenmiller@hotmail.com> | 2019-08-31 10:21:29 +0000 |
---|---|---|
committer | Ben Bodenmiller <bbodenmiller@hotmail.com> | 2019-08-31 10:21:29 +0000 |
commit | 8898ea87bae5b171ec2d22772e3b0d10a2f73975 (patch) | |
tree | d66514b646191d79f95346886be9481ec0cb2d64 /app/models/ci/job_artifact.rb | |
parent | cc70c6a54aa64425dfa8a3896625b308a83536c3 (diff) | |
parent | 195ac30514e98b0f97bd191183124f06d1d221fc (diff) | |
download | gitlab-ce-8898ea87bae5b171ec2d22772e3b0d10a2f73975.tar.gz |
Merge branch 'master' into 'patch-73-move-storage-shards'patch-73-move-storage-shards
# Conflicts:
# app/models/project.rb
# spec/models/project_spec.rb
Diffstat (limited to 'app/models/ci/job_artifact.rb')
-rw-r--r-- | app/models/ci/job_artifact.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/ci/job_artifact.rb b/app/models/ci/job_artifact.rb index e132cb045e2..b4497d8af09 100644 --- a/app/models/ci/job_artifact.rb +++ b/app/models/ci/job_artifact.rb @@ -87,6 +87,8 @@ module Ci scope :expired, -> (limit) { where('expire_at < ?', Time.now).limit(limit) } + scope :scoped_project, -> { where('ci_job_artifacts.project_id = projects.id') } + delegate :filename, :exists?, :open, to: :file enum file_type: { |