diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-01-29 14:40:47 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-01-29 14:42:53 +0100 |
commit | 9f307421a7c6f18a9879598e107f9e36456abd83 (patch) | |
tree | 0e5681547b0bc910960266e744f2184429cfe8e1 /app/models | |
parent | d434af46f4e8f2f3d149bf15674098afe9710a4a (diff) | |
download | gitlab-ce-9f307421a7c6f18a9879598e107f9e36456abd83.tar.gz |
Simplify relation between a build and metadata
This removes erroneously defined polymorphic association, because
specifying `belongs_to` relationship with a class that already supports
polymorphic associations works out-of-the-box.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/ci/build_metadata.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/ci/build_metadata.rb b/app/models/ci/build_metadata.rb index 06e4584863d..cd8eb774cf5 100644 --- a/app/models/ci/build_metadata.rb +++ b/app/models/ci/build_metadata.rb @@ -10,9 +10,7 @@ module Ci self.table_name = 'ci_builds_metadata' - belongs_to :build, class_name: 'CommitStatus', - polymorphic: true, # rubocop:disable Cop/PolymorphicAssociations - inverse_of: :metadata + belongs_to :build, class_name: 'CommitStatus' belongs_to :project before_create :set_build_project |