Ash FrameworkAF
Ash Framework6mo ago
11 replies
Gonzalo Muñoz

Typed array attributes from `ash.gen.resource`

Hey guys, can array attributes be typed in Ash via generators?

When I run this:
mix ash.gen.resource MyApp.MyDomain.MyThing --attribute my_list:{array,string}:public

I get something like this:
project/lib/my_app/my_domain/my_thing.ex
attribute :my_list, :array do  # where string?
    public? true
end


I tried doing --attribute my_list:{:array,:string} but it gives me a compile error about array not being a recognized attribute modifier
Was this page helpful?