1
0

Update to Redmine 5/Rails 6

This commit is contained in:
cryptogopher
2023-12-07 17:01:42 +01:00
parent 71bfc5a33a
commit a784ca6514
15 changed files with 19 additions and 21 deletions

View File

@@ -9,7 +9,7 @@ module BodyTracking::ProjectPatch
has_many :foods, -> { order "foods.name" }, dependent: :destroy,
extend: BodyTracking::ItemsWithQuantities
has_many :nutrient_exposures, -> { where view_type: "Nutrient" }, dependent: :destroy,
foreign_key: :view_id, foreign_type: :view_type,
foreign_key: :view_id,
class_name: 'Exposure', extend: BodyTracking::TogglableExposures
has_many :nutrient_quantities, -> { order "lft" }, through: :nutrient_exposures,
source: 'quantity'
@@ -24,7 +24,7 @@ module BodyTracking::ProjectPatch
has_many :meal_foods, through: :meal_ingredients, source: 'food',
extend: BodyTracking::ItemsWithQuantities
has_many :meal_exposures, -> { where view_type: "Meal" }, dependent: :destroy,
foreign_key: :view_id, foreign_type: :view_type,
foreign_key: :view_id,
class_name: 'Exposure', extend: BodyTracking::TogglableExposures
has_many :meal_quantities, -> { order "lft" }, through: :meal_exposures,
source: 'quantity'