I've updated from version 2 to 3 in our application. I've changed all new + perform to call which seems to be reasonable, but I've found one confusing aspect.
Before, I would create an instance of an organizer, pass it context, call perform and then ask for success? as I would with a normal interactor. Now I use call instead which returns context for interactors (which I can simply query) but call on organizer returns nothing (it is even the comment) and I have to then go and ask for the context explicitly first:
organizer = Organizer.call(some: data)
if organizer.context.success?
...
end
I believe the API should be unified and organizer should return context like interactors do.
I've updated from version 2 to 3 in our application. I've changed all
new
+perform
tocall
which seems to be reasonable, but I've found one confusing aspect.Before, I would create an instance of an organizer, pass it context, call
perform
and then ask forsuccess?
as I would with a normal interactor. Now I usecall
instead which returns context for interactors (which I can simply query) butcall
on organizer returns nothing (it is even the comment) and I have to then go and ask for the context explicitly first:I believe the API should be unified and organizer should return context like interactors do.