AshFormBuilder.Transformers.GenerateFormModule (AshFormBuilder v0.4.0)

View Source

Generates a Resource.Form helper module at compile time for every resource that declares one or more forms in forms do ... end.

The generated module exposes one function per declared action:

  • for_<action>/1 for create / read actions
  • for_<action>/2 for update / destroy actions (record + opts)

Plus introspection helpers:

  • actions/0 — list of declared action atoms
  • schema/1 — schema for the given action
  • nested_forms/1 — AshPhoenix.Form :forms config for an action
  • required_preloads/1 — relationships to preload when editing

Summary

Functions

after_compile?()

Callback implementation for Spark.Dsl.Transformer.after_compile?/0.