Skip to content

Commit

Permalink
Update pattern match in controller template
Browse files Browse the repository at this point in the history
  • Loading branch information
cpjolicoeur committed May 19, 2023
1 parent 6165d4e commit 7fc3ba9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion priv/templates/common/phx.gen.html/controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 7fc3ba9

Please sign in to comment.