How do you properly decorate the statemachine of S...
# support
v
How do you properly decorate the statemachine of Spree::Shipment? I would like to add an after transition to invoke a Spree::Event. Speaking of Spree::Events. They work when fired from the console, but not from within my decorator
c
We recently did this in the
solidus_taxjar
extension in this PR https://github.com/SuperGoodSoft/solidus_taxjar/pull/88/files. This might give you a starting point, you should be able to hook into any of the state machine transitions, here we’re doing it on
after_ship
.
Are you sure your decorator is being loaded? I would put a
binding.pry
and confirm the code you have is actually running.