1
0

Moved filter/compute to separate module

Converting it to model independent code, WIP
This commit is contained in:
cryptogopher
2019-12-12 00:13:30 +01:00
parent 98564be4b5
commit 96fe7db39d
3 changed files with 105 additions and 89 deletions

View File

@@ -1,7 +1,7 @@
module BodyTracking
module ProjectPatch
Project.class_eval do
has_many :measurements, -> { order "taken_at DESC" }, dependent: :destroy
has_many :measurements, -> { order "taken_at DESC" }, dependent: :destroy, extend: ItemsWithQuantities
has_many :ingredients, -> { order "name" }, dependent: :destroy
has_many :sources, dependent: :destroy