View Source Pyro.Resource.Info (Pyro v0.0.4)

Helpers to introspect the Pyro.Resource Ash extension. Intended for use in components that automatically build UI from resource configuration.

Link to this section Summary

Functions

Returns the form fields defined in the Pyro.Resource extension for the given action.

Link to this section Functions

Link to this function

form_for(resource, action_name)

View Source

Returns the form fields defined in the Pyro.Resource extension for the given action.

examples

Examples

iex> form_for(Pyro.Resource.InfoTest.User, :create) |> Map.get(:fields) |> Enum.map(& &1.name)
[:primary, :authorization, :friendships, :notes]