roberts.gulans
AEAsh Elixir
•Created by roberts.gulans on 5/5/2023 in #support
About policies
It seems that policies are not triggered. I found this and tried but without success.
https://discord.com/channels/711271361523351632/1079519120971812914
From examples we can see, that policies are invoked only if i explicitly pass
authorize?: true
or actor: current_user
even tho in api i have defined authorize :by_default
12 replies
AEAsh Elixir
•Created by roberts.gulans on 5/4/2023 in #support
How to create organization after user creation.
Ideally it would create organization for user after registration, but if user comes from invitation (to specific organization) than it does not create new one.
No functionality is created yet, im not sure, how to even approach this.
In user resource there isnt even actions for create. Apparently its definition happens somewhere in i suppose.
Sorry if i ask noob questions, i find docs rather confusing.
16 replies
AEAsh Elixir
•Created by roberts.gulans on 5/3/2023 in #support
select relationship
Resource relevant parts
In live view form_component i have form where i show select to select relationship
Input component
I dont understand why but selects does not hold their selected value. I can select one, but once i select other first looses value. For plain string value
AshPhoenix.Form.value(f, field)
returns correct input value, but for selects not.
Unrelated: for errors i had to do: AshPhoenix.Form.errors(f, format: :simple, for_path: [])[field]
, because AshPhoenix.Form.errors(f, format: :simple)
returned %{[] => %{key => value}}
If some relevant info is missing please let me know, i will provide it.18 replies
AEAsh Elixir
•Created by roberts.gulans on 5/2/2023 in #support
Union relationships
Hello i have 2 resources.
Accounts and Payments.
Each payment has 2 relationships to accounts
And i want to have one relationship in Account
Is there a way how i could have payments relationship to hold both those so i could have one list with all payments to order/paginate/filter on it.
6 replies
AEAsh Elixir
•Created by roberts.gulans on 4/30/2023 in #support
All extensions list.
In one of the talks i heard cqrs/commanded mentioned. Is there some package at least in beta or smth? And broader question is where are list of all extensions, even 3rd party? I understand that ash currently is pretty young and theres probably not much, but i see huge potential in reusability and having something like https://tailwindcomponents.com/ but for ash resources.
3 replies