morfertaw
Explore posts from serversAEAsh Elixir
•Created by morfertaw on 9/25/2023 in #support
Attributes on `many_to_many` join/through resources.
Considering the following resources.
The following create attempt fails.
This is because attributes
:quantity
and :unit
are not being set on FormulaReactant
. How would a create action on Formula
be setup to set both attributes?4 replies
AEAsh Elixir
•Created by morfertaw on 9/23/2023 in #support
Identity on `attribute :some_attribute, {:array , EmbeddedResource}`
So if I have the following resource.
And the following embedded resource.
If I do the following changeset twice.
It succeeds once and then fails a second time, which is as expected. The
:unique_some_attribute
identity prevents two records with some_attribute: nil
. However If the next changeset is repeated twice.
Two resources with the same :some_attribute
field are created. I had hoped this to be prevented by the :unique_some_attribute
identity.
The resulting records look something like the following.
I assume the autogenerated_id
fields being unique is preventing the desired outcome. Would that work and can they be disabled?8 replies
AEAsh Elixir
•Created by morfertaw on 9/21/2023 in #support
Understanding "manage_relationship"
So I have a
many_to_many
relationship between the following resources.
Reactant
Source
6 replies
AEAsh Elixir
•Created by morfertaw on 9/18/2023 in #support
AshAuthenticationPhoenix controlling generated routes
I setup my phoenix app using the getting started with ash authentication guide. If I understand correctly adding routes works as follows:
Would it be possible to remove the register route from
auth_routes_for
generation? I would like more control over how new users can register. Can the register page also be removed from the /sign-in
liveview? I want to setup registration separately8 replies