I hereby claim:
- I am carlyleec on github.
- I am cameroncarlyle (https://keybase.io/cameroncarlyle) on keybase.
- I have a public key ASCHJcjnYP-pwreweJxmwJCkfK9lZrsJO75oX3tkmyp7lgo
To claim this, I am signing this object:
{ | |
"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> |
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, |
def register_user(attrs) do | |
%User{} | |
|> User.registration_changeset(attrs) | |
|> Repo.insert() | |
end |