Skip to content

Instantly share code, notes, and snippets.

@GesJeremie
Created April 23, 2017 16:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GesJeremie/248c0fda9fcbfd1a3e5610eb018e6830 to your computer and use it in GitHub Desktop.
Save GesJeremie/248c0fda9fcbfd1a3e5610eb018e6830 to your computer and use it in GitHub Desktop.
def create_contact(conn, %{"classified_contact" => params, "id" => id}) do
with {:ok, conn} <- CreateContactOperation.run(conn, params, %{classified_id: id}) do
conn
|> redirect(to: app_classified_path(conn, :show, id))
else
{:error, conn} ->
conn
|> show(%{"id" => id})
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment