Skip to content

Instantly share code, notes, and snippets.

@knewter
Created August 20, 2014 00:14
Show Gist options
  • Save knewter/eb3277ce8d3b12f1eb19 to your computer and use it in GitHub Desktop.
Save knewter/eb3277ce8d3b12f1eb19 to your computer and use it in GitHub Desktop.
def for_category(:uncategorized) do
Project
|> where([p], p.category_id)
|> select([p], p)
|> Repo.all
end
== Compilation error on file lib/beam_toolbox_data/models/project.ex ==
** (CompileError) lib/beam_toolbox_data/models/project.ex:49: function p/0 undefined
(stdlib) lists.erl:1336: :lists.foreach/2
(stdlib) erl_eval.erl:657: :erl_eval.do_apply/6
(elixir) src/elixir.erl:175: :elixir.erl_eval/3
(elixir) src/elixir.erl:163: :elixir.eval_forms/4
(elixir) src/elixir_lexical.erl:17: :elixir_lexical.run/3
(elixir) src/elixir.erl:175: :elixir.erl_eval/3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment