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
Is your proposal related to a problem? Please describe. AshPyro.Enum looks ideal for my in-progress Phoenix app using Ash for resources, but one of my enum-type attributes represents New Zealand districts, the names of some of which are hyphenated, so the opinionated "humanized" labels will be incorrect.
Describe the solution you'd like
An optional syntax for providing a label for an enum value that would be used by humanize_enum/1, if provided, otherwise the current behaviour would be used.
Describe alternatives you've considered
Just using Ash.Type.Enum with functions on my enum module for now.
Express the proposal either with a change to resource syntax, or with a change to the pyro interface
Possible syntax suggested by @frankdugan3 on the Ash Discord server:
I will eventually add this feature, along with better docs & testing. If I take too long to get around to it and you want to take a stab at a PR, feel free to give it a try!
Is your proposal related to a problem? Please describe.
AshPyro.Enum
looks ideal for my in-progress Phoenix app using Ash for resources, but one of my enum-type attributes represents New Zealand districts, the names of some of which are hyphenated, so the opinionated "humanized" labels will be incorrect.Describe the solution you'd like
An optional syntax for providing a label for an enum value that would be used by
humanize_enum/1
, if provided, otherwise the current behaviour would be used.Describe alternatives you've considered
Just using
Ash.Type.Enum
with functions on my enum module for now.Express the proposal either with a change to resource syntax, or with a change to the pyro interface
Possible syntax suggested by @frankdugan3 on the Ash Discord server:
Additional context
Official New Zealand district names and maps
The text was updated successfully, but these errors were encountered: