1
0

Added reference to Unit in Formula

Updated defaults identifiers and units in default formulas
This commit is contained in:
cryptogopher
2020-03-25 17:57:49 +01:00
parent c262e82c7b
commit 031b857925
3 changed files with 126 additions and 122 deletions

View File

@@ -4,6 +4,7 @@ class Formula < ActiveRecord::Base
attr_reader :parts, :quantities
belongs_to :quantity, inverse_of: :formula, required: true
belongs_to :unit, required: true
validates :code, presence: true
validate do