Leo (1) [Avatar] Offline
#1
Listing 5.11 uses a :name attribute in the defstrucure

defmodule Auction.Item do
  defstruct [:id, :name, :description, :ends_at]
end


Subsequent listing 5.12 assumes the attribute :title not :name
defmodule Auction.FakeRepo do alias Auction.Item
  @items [
      %Item{
id: 1,
title: "My first item",
description: "A tasty item sure to please", ends_at: ~N[2020-01-01 00:00:00]
}, %Item{
id: 2,
title: "WarGames BluRay",
description: "The best computer movie of all time, now on BluRay!", ends_at: ~N[2018-10-15 13:39:35]
}, %Item{
id: 3,
title: "U2 - Achtung Baby on CD",
description: "The sound of 4 men chopping down The Joshua Tree", ends_at: ~N[2018-11-05 03:12:29]
} ]