Relaxed quantity name uniqueness check
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user