hassanshahin
AEAsh Elixir
•Created by hassanshahin on 4/26/2023 in #support
function to_form/1 is undefined
I literally followed the "Getting Started With Ash And Phoenix" documentation example. Upon finishing and typing "iex - S mix phx.server" and pressing enter, I got the following error:
== Compilation error in file lib/my_ash_phoenix_app_web/example_live_view.ex ==
** (CompileError) lib/my_ash_phoenix_app_web/example_live_view.ex:41: undefined function to_form/1 (expected MyAshPhoenixAppWeb.ExampleLiveView to define such a function or for it to be imported, but none are available)
Shouldn't the framework define this function?
9 replies
AEAsh Elixir
•Created by hassanshahin on 2/8/2023 in #support
Best Way to Design Resources Properties
Hello. Firstly, this is a great community: friendly and responsive.
Secondly, I have a question that, I hope, is not silly.
Suppose I want to have a resource named Evals. In it, I want to have the attributes: description, and numeric, where each description corresponds to a specific numeric value.
My questions are:
1. What would you recommend: making an attribute of type map, or separating the two parts of the map into 2 attributes?
2. If I use the map type for the attribute, does it make sense to specify that I want only one by saying one_of: Map.to_list(my_map)
7 replies