DiffoExample.Changes.Assign (DiffoExample v0.2.2)

Copy Markdown View Source

After-action for :assign_*-style update actions on Diffo Instance resources that declare pools.

Applies the :assignment argument via Assigner.assign/3 against the named pool, then reloads the instance through its primary read so preparations re-run.

Pass the pool name as an option:

update :assign_pair do
  argument :assignment, :struct, constraints: [instance_of: Assignment]
  change {DiffoExample.Changes.Assign, pool: :pairs}
end