Trailblazer v1.1.0 Release Notes
-
- 0️⃣
Representer#represented
defaults tomodel
now, not tocontract
anymore. - The only way to let Trailblazer pass a document to the operation is via
is_document: true
. There is no guessing anymore based on whether or notRepresenter
is mixed into the operation or not. - ➕ Add
Operation#params!
that works exactly like#model!
: return another params hash here if you want to change theparams
structure while avoiding modifying the original one. - ➕ Add
Controller#params!
that works exactly likeOperation#params!
and allows returning an arbitrary params object in the controller. Thanks to @davidpelaez for inspiration. - 🗄 Deprecate
Dispatch
in favor ofCallback
. In operations, please includeOperation::Callback
. Also, introducedOperation#callback!
which aliases to#dispatch!
. Goal is having to think less, and now all naming is in line.
🛠 Fixes
Representer#to_json
now allows passing options.- 🛠 The
:params
key never got propagated toprepopulate!
when usingController#form
. This is now fixed.
- 0️⃣