Created
May 13, 2017 21:27
-
-
Save nhooyr/a7c628d76d872744b5a5f62baf9af7f6 to your computer and use it in GitHub Desktop.
This file contains 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 delete(conn, %{"id" => id}) do | |
user = Accounts.get_user!(id) | |
{:ok, _user} = Accounts.delete_user(user) | |
conn | |
|> put_flash(:info, "User deleted successfully.") | |
|> redirect(to: user_path(conn, :index)) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment