Changed Quantity.displayed -> Quantity.primary
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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|
|
||||
|
||||
Reference in New Issue
Block a user