Skip to content

Instantly share code, notes, and snippets.

@HeroicEric
Last active August 29, 2015 14:22
Show Gist options
  • Save HeroicEric/9ca2fae3040d14fd0e39 to your computer and use it in GitHub Desktop.
Save HeroicEric/9ca2fae3040d14fd0e39 to your computer and use it in GitHub Desktop.
** (FunctionClauseError) no function clause matching in Ecto.Adapters.Postgres.DateTime.encode_date/1
stacktrace:
(ecto) lib/ecto/adapters/postgres/datetime.ex:36: Ecto.Adapters.Postgres.DateTime.encode_date({{2010, 4, 17}, {14, 0, 0, 0}})
lib/postgrex/protocol.ex:280: anonymous fn/2 in Postgrex.Protocol.encode_params/1
(elixir) lib/enum.ex:977: anonymous fn/3 in Enum.map/2
(elixir) lib/enum.ex:1261: Enum."-reduce/3-lists^foldl/2-0-"/3
(elixir) lib/enum.ex:977: Enum.map/2
lib/postgrex/protocol.ex:275: Postgrex.Protocol.encode_params/1
lib/postgrex/protocol.ex:245: Postgrex.Protocol.send_params/2
lib/postgrex/protocol.ex:126: Postgrex.Protocol.message/3
@valid_attrs %{
access_token: "some content",
expires_at: %{day: 17, hour: 14, min: 0, month: 4, year: 2010},
user_id: 42
}
@invalid_attrs %{}
test "changeset with valid attributes" do
changeset = APIKey.changeset(%APIKey{}, @valid_attrs)
Repo.insert changeset
assert changeset.valid?
end
@HeroicEric
Copy link
Author

  defp deps do
    [
      {:phoenix, "~> 0.13"},
      {:phoenix_ecto, "~> 0.4"},
      {:postgrex, ">= 0.0.0"},
      {:phoenix_html, "~> 1.0"},
      {:phoenix_live_reload, "~> 0.4"},
      {:cowboy, "~> 1.0"},
      {:oauth2, "~> 0.1.1"},
      {:secure_random, "~> 0.1"},
      {:timex, "~> 0.13.4"},
      {:mock, "~> 0.1.1"}
    ]
  end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment