Reusable Ash Resources
I've got a commonly-used Ash resource that I'd like to put in an Elixir package for reuse across Phoenix apps. Is anyone doing this? Can anyone point me towards examples or best practice?
This works, but the
otp_app
is hardcoded:
This fails:
Ash compilation seems to require static configuration for otp_app
. Is that right?6 Replies
The otp app should typically refer to the app that distributes it. Why do you need to set it to the users otp app?
Thanks for the tip I'll give that a try...
I’m curious, why do we have to put otp_app on the resource?
it allows them to be configured, and tells us where to look for them in config for validating domains and stuff
you don't have to have it if you don't want to
you don't have to have it if you don't want to
Solution
that solved it for me. thanks again for the tips.