iyjim
How to make the function that provids default value of an argument of a generic action be able to get the actor?
Ash.Resource — ash v3.5.2 says that the default value can be a zero arity function e.g. &MyMod.my_fun/0 or a value.
What if the default argument value should depend on the actor? Is there a way to get the actor in the zero arity function?
Please help.
Marked As Solved
zachdaniel
So the problem there appears to be that it’s forwarding the params option to the underlying action input call. Could you open an issue on ash_phoenix?
Also Liked
zachdaniel
Oh you’re right, you’d want to validate once with params after calling the action, sorry
my inner LLM hallucinated that one ![]()
zachdaniel
Hmm…looking at the code, I wasn’t hallucinating. There definitely should be a params option when creating new forms. I tried it myself just recently and it worked ![]()
Last Post!
iyjim
I just created an issue on ash_phoenix, please have a look:
https://github.com/ash-project/ash_phoenix/issues/358
Thank you!
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









