I'm running into this error when I'm trying to create a session with a user from the database. My user schema has_many projects So when I try to create the session I get this error
projects: #Ecto.Association.NotLoaded<association :projects is not loaded>
I think I understand what it is saying but I don't know where to preload the data so that the page will render here is the full error that I receive.
defmodule PerriAir.Router do
use PerriAir.Web, :router
use Honeybadger.Plug
use ExAdmin.Route
pipeline :browser do
protocol Enumerable not implemented for %PerriAir.User{__meta__: #Ecto.Schema.Metadata<:loaded, "users">, id: 8, inserted_at: #Ecto.DateTime<2016-12-23 15:38:38>, password: nil, password_hash: "$2b$12$NxLaK3ZUVPLE23E1L.64GOjm7FtTLemXPUXsp6gSAP346is8e6d5e", projects: #Ecto.Association.NotLoaded<association :projects is not loaded>, updated_at: #Ecto.DateTime<2016-12-23 15:38:38>}
I'm new to elixir and phoenix so any help with this error would be appreciated!