1
0

Relaxed quantity name uniqueness check

This commit is contained in:
cryptogopher
2020-05-28 23:19:59 +02:00
parent 1bfe2f11fb
commit 008cfdcd26
4 changed files with 17 additions and 5 deletions

View File

@@ -2,6 +2,7 @@ module BodyTracking::ProjectPatch
Project.class_eval do
has_many :sources, dependent: :destroy
has_many :quantities, -> { order "lft" }, inverse_of: :project, dependent: :destroy
has_many :formulas, through: :quantities
has_many :units, dependent: :destroy
has_many :foods, -> { order "foods.name" }, dependent: :destroy,