1
0

Test pass: test_index_binding_goal_without_targets

This commit is contained in:
cryptogopher
2021-03-13 16:43:10 +01:00
parent 56e131af93
commit c21c834d84
3 changed files with 10 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
class Target < ActiveRecord::Base
belongs_to :goal, inverse_of: :targets, required: true
has_one :project, through: :goal, inverse_of: :targets
belongs_to :quantity, -> { where.not(domain: :target) }, inverse_of: :targets,
required: true
belongs_to :item, polymorphic: true, inverse_of: :targets