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
@spec form_for(Ash.Resource.t(), atom()) :: [ Pyro.Resource.Form.Field.t() | Pyro.Resource.Form.FieldGroup.t() ]
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]