Sending emails with Elixir/Phoenix
Stephan Bakkelund Valois
143
I just finished the tutorial and I am getting:
`
== Compilation error on file web/controllers/email_controller.ex ==
** (CompileError) web/controllers/email_controller.ex:34: undefined function emails/0
(stdlib) lists.erl:1337: :lists.foreach/2
(stdlib) erl_eval.erl:670: :erl_eval.do_apply/6
(elixir) lib/kernel/parallel_compiler.ex:100: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/8
`
So I added:
`
emails = Repo.all(Email)
`
below the changeset inside the create function. It then compiles, but then when I try to send an email I get error:
`
undefined function PhoenixGuardian.EmailController.create/4
`
Trying to figure this out…
All in all, great tutorial, I think it should be part of the official docs.