diff --git a/installer/templates/phx_ecto/data_case.ex b/installer/templates/phx_ecto/data_case.ex index 3ec498c660..80bfc874f0 100644 --- a/installer/templates/phx_ecto/data_case.ex +++ b/installer/templates/phx_ecto/data_case.ex @@ -50,7 +50,9 @@ defmodule <%= @app_module %>.DataCase do def errors_on(changeset) do Ecto.Changeset.traverse_errors(changeset, fn {message, opts} -> Regex.replace(~r"%{(\w+)}", message, fn _, key -> - opts |> Keyword.get(String.to_existing_atom(key), key) |> to_string() + opts + |> Keyword.get(String.to_existing_atom(key), key) + |> inspect() end) end) end