make Model macro work without params
aiomaster opened this issue · 1 comments
aiomaster commented
if you just want do build an empty model you don't need params every time, but the code enforces it.
The model call https://github.com/trailblazer/trailblazer-macro/blob/master/lib/trailblazer/operation/model.rb#L17 assumes that params: key is given.
Please make that key optional (set to {} by default), so that this Create Operation just works even if params key is not given at calltime:
https://github.com/trailblazer/trailblazer-macro/blob/master/test/operation/model_test.rb#L21
KamilMilewski commented
fixed in: 270f40f