1
0

Defaults/import fixes and ingredients sorting

This commit is contained in:
cryptogopher
2019-09-23 00:15:40 +02:00
parent 3ebc2f58d0
commit 9cbd540c43
4 changed files with 9 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
module BodyTracking
module ProjectPatch
Project.class_eval do
has_many :ingredients, dependent: :destroy
has_many :ingredients, -> { order "name" }, dependent: :destroy
has_many :quantities, -> { order "lft" }, dependent: :destroy
has_many :units, dependent: :destroy