How would I create a nested form for example given in the Ash docs Define Polymorphic Relationships — ash v3.24.3 ?
I can create each resource manually, so I tried to create a nested form by following Nested Forms — ash_phoenix v2.3.21 . As suggested in Ash 3.4.48 breaks the example in "Define Polymorphic Relationships" document - #4 by iyjim , I added a change manage_relationship to the BankAccount’s create action.
create :create do
accept [:account_number, :type]
argument :implementation, AccountImplementation do
allow_nil? false
public? true
end
change manage_relationship(:implementation, type: :create)
end
My nested form does not display and I receive an diagnostic error saying that :implementation is not a relationship.
Diagnostics:
** (Spark.Error.DslError) [...]
actions -> create -> create -> change -> manage_relationship -> implementation defined in ...
No such relationship implementation exists.
How can I create a nested form in AshPhoenix which will create a BankAccount and a SavingsAccount (or CheckingAccount) upon submit?






















