Skip to content

Instantly share code, notes, and snippets.

@diogovk
diogovk / phoenix_belongs_to_catch
Last active November 30, 2018 21:31
protocol Ecto.Queryable not implemented for <Module>, the given module does not exist
defmodule Freshcards.Post do
use Freshcards.Web, :model
schema "posts" do
field :title, :string
belongs_to :user, Freshcards.User # right!
# belongs_to :user, User <-- wrong
timestamps
end