Ash FrameworkAF
Ash Framework8mo ago
5 replies
Vinicius Moreira

Use arguments in Relationship

I would like to pass some arguments to a has_many relationship, which would be provided by a read action.

actions do read :list do argument :start_in, DateTimeUsec, allow_nil?: false argument :finish_id, DateTimeUsec, allow_nil?: false prepare build(load: :transactions) pagination keyset?: true, default_limit: 5, countable: :by_default end end


relationships do has_many :transcations, Transactions end
Was this page helpful?