sample_app_1 =
IndieInfinity.DirectoryFixtures.app_fixture(%{
name: "B Game",
app_id: 1,
app_type: "game",
coming_soon: true,
release_date: Date.new(2000, 1, 1)
})
When I try and persist the structure above I get
** (MatchError) no match of right hand side value: {:error, #Ecto.Changeset<action: :insert, changes: %{name: "B Game", app_id: 1, app_type: "game", coming_soon: true}, errors: [release_date: {"is invalid", [type: :date, validation: :cast]}], data: #IndieInfinity.Directory.App<>, valid?: false>}
When I do
sample_app_1 =
IndieInfinity.DirectoryFixtures.app_fixture(%{
name: "B Game",
app_id: 1,
app_type: "game",
coming_soon: true,
release_date: ~D[2000-01-01]
})
it works. The only difference is the use of the date sigil vs Date.new. How are the two different?






















