1
0

Added :meals and :compositions_ingredients tables

Changed Column -> QuantityColumn
Updated :ingredients table to handle recipes
This commit is contained in:
cryptogopher
2020-04-13 01:11:34 +02:00
parent dbb8bdc62e
commit ced06a25bc
6 changed files with 28 additions and 9 deletions

View File

@@ -10,8 +10,8 @@ module BodyTracking::ProjectPatch
has_many :quantities, -> { order "lft" }, dependent: :destroy
has_many :units, dependent: :destroy
has_many :nutrient_columns, as: :column_view, dependent: :destroy, class_name: 'Column',
extend: BodyTracking::TogglableColumns
has_many :nutrient_columns, as: :column_view, dependent: :destroy,
class_name: 'QuantityColumn', extend: BodyTracking::TogglableColumns
has_many :nutrient_quantities, -> { order "lft" }, through: :nutrient_columns,
source: 'quantity'
end