1
0

Changed Quantity.displayed -> Quantity.primary

This commit is contained in:
cryptogopher
2019-10-22 23:19:58 +02:00
parent 9578de8287
commit c0e3fd2e85
4 changed files with 8 additions and 8 deletions

View File

@@ -27,7 +27,7 @@ class BodyTrackersController < ApplicationController
parent: q.parent ? available[[q.parent.name, q.parent.domain]] : nil,
name: q.name,
description: q.description,
displayed: q.displayed
primary: q.primary
})
available[[q.name, q.domain]] = obj
end

View File

@@ -135,7 +135,7 @@ class IngredientsController < ApplicationController
def nutrients
ingredients = @project.ingredients.includes(:ref_unit, nutrients: [:quantity, :unit])
@header = @project.quantities.where(displayed: true)
@header = @project.quantities.where(primary: true)
@nutrients = Hash.new { |h,k| h[k] = {} }
@descriptions = Hash.new { |h,k| h[k] = [] }
ingredients.each do |i|