Last active
June 27, 2018 05:01
-
-
Save toraritte/7d968d8c1297ad5ea7bdf71ffeb0fbdb to your computer and use it in GitHub Desktop.
Add IEx.pry to the `create` function in `user_controller.ex`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def create(conn, %{"user" => user_params}) do | |
| # + + + + + + + + + + + + | |
| require IEx; IEx.pry # <- | |
| # + + + + + + + + + + + + | |
| case Accounts.create_user(user_params) do | |
| {:ok, user} -> | |
| conn | |
| |> put_flash(:info, "User created successfully.") | |
| |> redirect(to: user_path(conn, :show, user)) | |
| {:error, %Ecto.Changeset{} = changeset} -> | |
| render(conn, "new.html", changeset: changeset) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment