json.array! @ingredients do |i| json.extract! i, :ingredient_id, :name, :density json.id i.ingredient_id end