Ash Framework
The Elixir backend framework for unparalleled productivity. Declarative tools that let you stop wasting time. Use with Phoenix LiveView or build APIs in minutes for your front-end of choice.
JoinAsh Framework
The Elixir backend framework for unparalleled productivity. Declarative tools that let you stop wasting time. Use with Phoenix LiveView or build APIs in minutes for your front-end of choice.
JoinWhen trying to set password using my own update I get Postgres type error in AshAuthentication
Ash.Resource.Calculation with field_policy
Problem with load of User
Problem with Ash.Type.dump_to_native/2 after upgrade to 3.5.41
How to load archived resources?
No actor in after_action context
after_change
callback. I've tried to use the context
but the actor
was always nil
. I've ended up doing this:
```elixir
actions do
defaults [:read, :destroy]...mix ash.codegen not detecting changes
mix ash.gen.resource
, and mix ash.codegen
is says No changes detected, so no migrations or snapshots have been created.
I am also getting a strange compiler warning about redefined modules, which makes me suspect something has gone wrong with the generators.
❯ mix ash.gen.domain ChocolateMusicPlayer.Collection; mix ash.gen.resource ChocolateMusicPlayer.Collection.Track --default-actions read,create --uuid-primary-key id --attribute length:integer:public --attribute number:integer:public --attribute position:integer:public --attribute title:string:public; mix ash.gen.resource ChocolateMusicPlayer.Collection.Release --default-actions read,create --uuid-primary-key id --attribute date:date:public --attribute title:string:public --relationship has_many:tracks:ChocolateMusicPlayer.Collection.Track
❯ mix ash.gen.domain ChocolateMusicPlayer.Collection; mix ash.gen.resource ChocolateMusicPlayer.Collection.Track --default-actions read,create --uuid-primary-key id --attribute length:integer:public --attribute number:integer:public --attribute position:integer:public --attribute title:string:public; mix ash.gen.resource ChocolateMusicPlayer.Collection.Release --default-actions read,create --uuid-primary-key id --attribute date:date:public --attribute title:string:public --relationship has_many:tracks:ChocolateMusicPlayer.Collection.Track
Proceed with changes?
prompt....--extend postgres
`on_conflict: :nothing` for a create action
on_conflict: :nothing
for a create action?
I've added this to my action, but IMO it looks weird:
```elixir...destroy unmatching related associations
AshPhoenix checkboxes acting wonky
Membership FilterCheck
Ash.Policy.FilterCheck
) with a goal to authorize access if the actor is a member of the space associated with a given resource (optionally filtered by actor’s role in given space).
I took inspiration from Ash.Policy.Check.RelatesToActorVia
, but instead of comparing to a single actor ID, I need to check whether the resource’s space_id
is in the list of the actor’s valid space memberships....Custom on option on update action
update_contact_cool_action(contact, attrs, push_sync: false)
update_contact_cool_action(contact, attrs, push_sync: false)
Table renamed but old table remains
mix ecto.gen.migration
gets you a one-off migrationInvalid Filter Reference
Ash.Error.Query.InvalidFilterReference
I'm trying to push a particular filter into the DB level. I have this calculation, which works:
```elixir...How do I make a query require authentication and return an error if the user is not logged in?
Grab my user's tenant name so I can display it
AshAi tool calling
Tenant registration on sign-in.
Prevent accessing route if logged in
:redirect_if_user_authenticated
but I can't find the Ash way to achieve this....