You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since paper trail is cross-cutting across multiple actions, we'd probably want to use the latter, so ash_paper_trail would extract anything in the paper_trail_metadata context key or something along those lines.
Is your feature request related to a problem? Please describe.
I have a requirement to add various metadata to each version, e.g.
reason_for_change
for auditing compliance.Describe the solution you'd like
Ideally, the DSL of
AshPaperTrail
would allow specifying metadata arguments to accept from the action to merge into the version.Describe alternatives you've considered
Express the feature either with a change to resource syntax, or with a change to the resource interface
Simple example:
It may be important to support more advanced uses, like pulling a nested field from the context and naming the key:
Additional context
For implementation, perhaps we could use a special context to store the metadata:
which could then be encoded on each version.
The text was updated successfully, but these errors were encountered: