defmodule Arcade.TemplateMedia do
use Ecto.Schema
import Ecto.{Changeset, Query}
def for_template_id(query \ MODULE, t_id) do
from u in query,
where u.template_id == ^t_id
end
== Compilation error in file lib/arcade/template_media.ex ==
** (ArgumentError) second argument to from must be a compile time keyword list
I am trying to use this function to pass into a Repo.all()
I don't understand this error. I have the same kind of code in another project with no problem. Is this an Ecto syntax issue between versions? It looks straightforward to me. What am I missing?