I had no problem replacing the `return_authorizati...
# support
j
I had no problem replacing the
return_authorizations
state machine as described in the documentation, using
Copy code
Spree.config do |config|
   ...
   config.state_machines.return_authorization = '::StoreName::StateMachines::ReturnAuthorization'
   ...
end
but when I try to do the same with the
return_item_acceptance
state machine adding
Copy code
config.state_machines.return_item_acceptance = '::StoreName::StateMachines::ReturnItem::AcceptanceStatus'
to the block, it doesn't seem to work. I can set
return_authorization
to the
ReturnItem::AcceptanceStatus
machine, so it doesn't seem to be a problem with the new state machine. Any ideas?
j
Likely a load order thing. Something is probably causing that model to be loaded before your configuration sets that value. I'd look into it from that perspective.
j
Thanks Jared for the suggestion. For anyone else reading this, I found that
Spree::Core::StateMachines
has an instance variable
@return_item_acceptance_status
but an attr_writer
return_item_acceptance
. Same thing with
return_item_reception
. I monkey patched it in my application and got it working.
j
I don't 100% follow what you mean regarding your solution, but if there's a bug in Solidus around that, we'd appreciate if you filed an issue so we can get it fixed.