I am using gem state_machine - Official
Each state can have a "human name". In the docs and APIs I tried:
in my_model.rb
state_machine :initial => :new do state :new, :human_name => 'Added and not accepted' ...
in my_view.haml
%p= MyModel.human_state_name(@item.state_name) %p= @item.human_state_name
both options return only "new" instead of "Added and not accepted." What should I do? Am I mistaken in setting up a person’s name or in getting a person’s name?
Update Works in:
en: activerecord: state_machines: mymodel:
dmr
source share