Skip to content

Instantly share code, notes, and snippets.

View carlyleec's full-sized avatar

Cameron Carlyle carlyleec

  • City of Asheville
  • United States
View GitHub Profile
{
"test": "it worked"
}
{
"test": "it worked"
}
<!doctype html>
<html lang="en">
<head>
<!-- The first thing in any HTML file should be the charset -->
<meta charset="utf-8">
<!-- Make the page mobile compatible -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>NC GIS</title>
</head>

Keybase proof

I hereby claim:

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am carlyleec on github.
* I am cameron_carlyle (https://keybase.io/cameron_carlyle) on keybase.
* I have a public key ASCVcsxZ0jvgtkOZ8SPdXDI7Vw46YPFqCPGaBABdkyFyyAo
To claim this, I am signing this object:
...
def new(conn, _params) do
changeset = Accounts.change_user_registration(%User{})
render(conn, "new.html", changeset: changeset)
end
def create(conn, %{"user" => user_params}) do
case Accounts.register_user(user_params) do
{:ok, user} ->
...
def new(conn, _params) do
render(conn, "new.html", error_message: nil)
end
def create(conn, %{"user" => user_params}) do
%{"email" => email, "password" => password} = user_params
if user = Accounts.get_user_by_email_and_password(email, password) do
...
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
plug :fetch_current_user
end
...
def new(conn, _params) do
render(conn, "new.html")
end
def create(conn, %{"user" => %{"email" => email}}) do
if user = Accounts.get_user_by_email(email) do
Accounts.deliver_user_confirmation_instructions(
user,
...
@derive {Inspect, except: [:password]}
schema "users" do
field :email, :string
field :password, :string, virtual: true
field :hashed_password, :string
field :confirmed_at, :naive_datetime
timestamps()