refactor: add opts_with_actor helper and improve error formatting

Add opts_with_actor helper function to reduce duplication when building
Ash options with actor and domain. Improve format_error documentation
and ensure consistent error message formatting.
This commit is contained in:
Moritz 2026-01-08 15:54:49 +01:00
parent 34afe798ec
commit 5ac9ab7ff9
Signed by: moritz
GPG key ID: 1020A035E5DD0824
4 changed files with 26 additions and 9 deletions

View file

@ -15,7 +15,7 @@ defmodule MvWeb.RoleLive.Form do
alias Mv.Authorization.PermissionSets
import MvWeb.RoleLive.Helpers
import MvWeb.RoleLive.Helpers, only: [format_error: 1]
on_mount {MvWeb.LiveHelpers, :ensure_user_role_loaded}