Commit 9f307421 authored by Grzegorz Bizon's avatar Grzegorz Bizon

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.
parent d434af46
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment