AshPhoenix.AshEnum (ash_phoenix v2.3.18)

View Source

Utilities for using Ash.Type.Enum with Phoenix.

Summary

Functions

Takes an Ash enum module and returns a list suitable for passing to Phoenix.HTML.Form.options_for_select/2, using the enum values and their labels.

Functions

options_for_select(enum)

@spec options_for_select(module()) :: [{String.t(), atom()}]

Takes an Ash enum module and returns a list suitable for passing to Phoenix.HTML.Form.options_for_select/2, using the enum values and their labels.