I’m working through a tutorial on phoenix authentication (https://goo.gl/yCvd37), actually my 6th or 7th such, but I keep running into the exact same error no matter what I do. At first I thought it might be a problem with using newer phoenix, but I think now that there is something that I have set incorrectly somewhere.
The issue is that I create a very basic login page, but I always get the error:
assign @conn not available in eex template.
and I think the relevant information says
Available assigns: [:action].
Here is the
new function from my controller:
def new(conn, _params) do render conn, "new.html" end
and my view:
defmodule Myapp.SessionView do use Myapp.Web, :view end
and my template for
<%= render "form.html", action: session_path(@conn, :create) %>
and (I think) the relevant part of my template for
<%= form_for @conn, session_path(@conn, :create), [as: :session], fn f -> %> ... just a basic login form here <% end %>
It really seems like this should work since it’s the same info I find over and over, so please let me know if I’m missing something simple. Thanks!