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
Describe the bug
Using the .human_state_name on an instance's current state, it does not use the custom display name, if there is one present. It will use the localized state name.
Describe the bug
Using the
.human_state_name
on an instance's current state, it does not use the custom display name, if there is one present. It will use the localized state name.To Reproduce
Steps to reproduce the behavior:
Overriding a state's display name:
Expected behavior
I'd expect
o.aasm.human_state
to return the custom display name,"Active"
Additional context
It looks like the
human_state
comes from thehuman_state_name
method in theLocalizer
class:aasm/lib/aasm/localizer.rb
Lines 11 to 18 in f7231d1
Potentially the default could be changed to:
:default => state.display_name
.The text was updated successfully, but these errors were encountered: