   end
 
   defp update_repository(repo, article) do
-    IO.inspect article
     file_name = "index.md"
     Path.join(article.repository.path, file_name) |> File.write article.body
     Git.add repo, "--all"
     Git.commit repo, "-m 'Update'"
   end
-
 end

  end

  def delete(conn, %{"id" => id}) do
    article = Repo.get!(Article, id)

    # Here we use delete! (with a bang) because we expect
    # it to always work (and if it does not, it will raise).
    Repo.delete!(article)

    conn


    case Repo.update(changeset) do
      {:ok, article} ->
        %Git.Repository{path: article.repository.path} |> update_repository article

        conn
        |> put_flash(:info, "Article updated successfully.")
        |> redirect(to: my_article_path(conn, :show, article))
