We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
state_machines-activemodel/lib/state_machines/integrations/active_model.rb
Line 507 in 3ae1274
This code forces the human_name via translation even when the human name is hard coded in the state definition. state-machines/state_machines#76 (comment)
human_name
For example, setting the human_name should be supported like this...
class MyClass state_machine :state, initial: :pending do state :pending, human_name: "To Do" state :in_progress, human_name: "In Progress" end end
irb(main):154:0> MyClass.human_state_name :pending => "To Do"
Recommend changing line #507 to
new_state.human_name ||= ->(state, klass) { translate(klass, :state, state.name) }
and only using the translation for the human state name if it is not coded in the state definition.
Thanks for your consideration!
The text was updated successfully, but these errors were encountered:
Please consider our PR to resolve this issue.
#38 (comment)
Thank you!
Sorry, something went wrong.
No branches or pull requests
state_machines-activemodel/lib/state_machines/integrations/active_model.rb
Line 507 in 3ae1274
This code forces the
human_name
via translation even when the human name is hard coded in the state definition.state-machines/state_machines#76 (comment)
For example, setting the
human_name
should be supported like this...Recommend changing line #507 to
and only using the translation for the human state name if it is not coded in the state definition.
Thanks for your consideration!
The text was updated successfully, but these errors were encountered: