gvanders
AEAsh Elixir
•Created by gvanders on 5/10/2023 in #support
Polymorphic Embedded Resources?
Grabbing the value of the union type returns an Ash.Resource struct. Are you thinking to then feed that in to an additional
AshPhoenix.Form.for_update
? My first thought was to implement it similar to multi-step forms where changing the tag value changed the nested form , but I haven't made one of those yet so thats all in theory14 replies
AEAsh Elixir
•Created by roberts.gulans on 5/4/2023 in #support
How to create organization after user creation.
This is way late but just in case, this may help https://discord.com/channels/711271361523351632/1097619151029289131/1097939364065062983
16 replies
AEAsh Elixir
•Created by gvanders on 4/28/2023 in #support
Nested embedded Resource Form
I'll take a look! Thanks for all the help 🙂
28 replies
AEAsh Elixir
•Created by gvanders on 4/28/2023 in #support
Nested embedded Resource Form
ahhh sorry that question was to a comment earlier in the thread
28 replies
AEAsh Elixir
•Created by gvanders on 4/28/2023 in #support
Nested embedded Resource Form
Is this something I'd implement on my side? Or that we'd add to
AshPhoenix
?28 replies
AEAsh Elixir
•Created by gvanders on 4/28/2023 in #support
Nested embedded Resource Form
Then I'd have to know ahead of time which are nil. Which I guess is easy. If I have the
data
option set, I assume it shouldn't matter if the form is clobbered? 28 replies
AEAsh Elixir
•Created by gvanders on 4/28/2023 in #support
Nested embedded Resource Form
Mmm yeah probably simplest if I just keep the add_form
28 replies
AEAsh Elixir
•Created by gvanders on 4/28/2023 in #support
Nested embedded Resource Form
I'm parsing a tailwind string into resources, and then converting it back to string after form is submitted. So I just need to make sure theres an empty resource
28 replies
AEAsh Elixir
•Created by gvanders on 4/28/2023 in #support
Nested embedded Resource Form
Since that looks right, just checked something. In the actual data, I had one of the embedded resources set to
nil
(the second one). When it's not nil it appears. Sorry for that. I don't know if Ash should handle that case, but I'll make sure theres default empty structs28 replies
AEAsh Elixir
•Created by gvanders on 4/28/2023 in #support
Nested embedded Resource Form
Took out the
Keyword.get(:forms
before the map28 replies
AEAsh Elixir
•Created by gvanders on 4/19/2023 in #support
Reading Tenant ETS resources returns empty array
No problem! https://github.com/ash-project/ash/issues/567
10 replies
AEAsh Elixir
•Created by gvanders on 4/19/2023 in #support
Reading Tenant ETS resources returns empty array
tenant
field in the map isn't nil
? Theres some add_tenant functions which only trigger for :context10 replies
AEAsh Elixir
•Created by gvanders on 4/19/2023 in #support
Reading Tenant ETS resources returns empty array
Yep attribute multi-tenancy
10 replies
AEAsh Elixir
•Created by gvanders on 4/19/2023 in #support
Reading Tenant ETS resources returns empty array
As far as I can tell the
tenant
is nil on the read path, so it doesn't look in the right table. This is for attribute multitenancy, not sure about context.10 replies
AEAsh Elixir
•Created by gvanders on 4/19/2023 in #support
Reading Tenant ETS resources returns empty array
I can see the tenant table created and can get the data out with
tab2list
, so issue looks to be on the read path10 replies
AEAsh Elixir
•Created by gvanders on 4/18/2023 in #support
Patterns for Propagating Tenants to LiveComponents/LiveViews?
ahhh gotcha. Thanks 🙂
14 replies
AEAsh Elixir
•Created by gvanders on 4/18/2023 in #support
Patterns for Propagating Tenants to LiveComponents/LiveViews?
Is the tenant always accessible via :_tenant in the DSLs??
14 replies
AEAsh Elixir
•Created by gvanders on 4/18/2023 in #support
Patterns for Propagating Tenants to LiveComponents/LiveViews?
Not sure if I should make a new thread for this but I'm confused as to how to implement PubSub to work with tenants? If I have a pubsub notifier which says when something is added, and is added to the a list, I will get updates across tenant. Seems like I'll need to prefix a tenant_id somehow?
14 replies
AEAsh Elixir
•Created by gvanders on 4/17/2023 in #support
AshAuthenticationPhoenix Override Register Form
For completeness, the way I achieved this was by making a custom SignInLive, which was basically a copy of SignIn component in AshAuthentication.Phoenix, just with <:registry_extra> used in the strategy slot.
I did not end up sticking with this, and instead created a default tenant on sign-in via
signed in with this action
With these options
Really loved how the custom actions were validated! Was not expecting that and was able to just follow the error messages for what I was missing @jart
6 replies