You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a state machine with a namespace and create_scopes: true, I would expect the automatically created scopes to be prepended with the namespace. But they're not.
For example, with this state machine:
aasm column: :final_targeting_state, namespace: :final_targeting, create_scopes: true do
state :unstarted, initial: true
state :started
state :succeeded
state :failed
end
Describe the bug
When creating a state machine with a namespace and
create_scopes: true
, I would expect the automatically created scopes to be prepended with the namespace. But they're not.For example, with this state machine:
I would expect the class to respond to:
klass.final_targeting_unstarted
klass.final_targeting_started
klass.final_targeting_succeeded
klass.final_targeting_failed
But it doesn't. It responds to:
klass.unstarted
klass.started
klass.succeeded
klass.failed
This is different from the issue with double-creating method names in both their unnamespaced and namespaced versions. Here, it's not that two versions of each scope get created, namespaced & unnamespaced. It's that only one version gets created, and it's not the one I'd expect.
Expected behavior
I'd expect namespaces to be reflected in automatic scope names.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: