Closed rosskevin closed 9 years ago
The best options appears to be to add the namespace
field to the state transition.
:+1:
what about machine
or machine_name
?
Well, since the attribute on machine is namespace
, I figured it might be best to label it as such.
state_machine :alarm_state, initial: :active, namespace: :'alarm' do
So our field/value is namespace: 'alarm'
:shipit:
resolved with commit 61548c0bfb4ed49291f06d412b264b8a8c188708 and released as 1.0.1
This is particularly confusing with multiple state_machines. An event called by
#canceled_payment
in thepayment
namespace should not be possibly confused withcanceled
in another, though both would be logged as such in the database.It appears that
#state_name
(with no namespace) and#payment_state_name
(in apayment
namespaced state_machine) both yieldcanceled
instead of a full state name like you would expect from the generated event method name.