April 2018
Beginner to intermediate
406 pages
9h 33m
English
We'll need to start off by creating the actual file that will be used as the primary interface for our context. We already created our lib/vocial/accounts directory, so it will be pretty easy for us to next create our context file. Let's create lib/vocial/accounts/accounts.ex and give it a basic structure:
defmodule Vocial.Accounts do import Ecto.Query, warn: false alias Vocial.Repo alias Vocial.Accounts.Userend
Next, we'll need to give it some sort of starting function so that we can actually start to test that we've successfully hooked up the user schema to the accounts context and then to our application at large. We'll start simply, by creating a list_users() function that will just return a list of every ...