It seems like I’m doing something wrong, still get an argument error.
def list_items do
item = Repo.all(Item) |> Repo.preload([:user])
end
def get_item(id) do
@repo.get!(Item, id) |> Repo.preload([:user])
end
schema
schema "items" do
field :title, :string
field :description, :string
field :ends_at, :utc_datetime
belongs_to :user, Auction.User
has_many :bids, Auction.Bid
timestamps()
end