improve invites, record usage

This commit is contained in:
2023-02-04 16:46:37 -05:00
parent 47dab6490d
commit 2c0a4dd7ca
46 changed files with 988 additions and 725 deletions

View File

@ -43,7 +43,7 @@ defmodule Cannery.DataCase do
"""
def errors_on(changeset) do
Ecto.Changeset.traverse_errors(changeset, fn {message, opts} ->
Regex.replace(~r"%{(\w+)}", message, fn _content, key ->
Regex.replace(~r"%{(\w+)}", message, fn _capture, key ->
opts |> Keyword.get(String.to_existing_atom(key), key) |> to_string()
end)
end)