From 7fc3ba95c83d8d13475217e7d692baef96ca19bd Mon Sep 17 00:00:00 2001 From: Craig P Jolicoeur Date: Fri, 19 May 2023 08:47:46 -0400 Subject: [PATCH] Update pattern match in controller template --- priv/templates/common/phx.gen.html/controller.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/priv/templates/common/phx.gen.html/controller.ex b/priv/templates/common/phx.gen.html/controller.ex index 3f024924..be206eff 100644 --- a/priv/templates/common/phx.gen.html/controller.ex +++ b/priv/templates/common/phx.gen.html/controller.ex @@ -11,7 +11,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web case <%= inspect context.alias %>.paginate_<%= schema.plural %>(params) do {:ok, assigns} -> render(conn, "index.html", assigns) - error -> + {:error, error} -> conn |> put_flash(:error, "There was an error rendering <%= schema.human_plural %>. #{inspect(error)}") |> redirect(to: Routes.<%= schema.route_helper %>_path(conn, :index))