Skip to content
New issue

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

Rails generator should humanize enum key for default I18n value #100

Closed
masterT opened this issue Nov 5, 2021 · 0 comments · Fixed by #101
Closed

Rails generator should humanize enum key for default I18n value #100

masterT opened this issue Nov 5, 2021 · 0 comments · Fixed by #101

Comments

@masterT
Copy link
Contributor

masterT commented Nov 5, 2021

rails generate enumerate_it:enum foo_type bar_baz
      create  config/locales/foo_type.yml
      create  app/enumerations/foo_type.rb
# config/locales/foo_type.yml
en:
  enumerations:
    foo_type:
      bar_baz: 'Bar_baz'

I would expect the value for bar_baz to be humanize: 'Bar baz' instead of 'Bar_baz'.

"bar_baz".humanize
# => "Bar baz"
@masterT masterT changed the title Rails generator should humanized enum key for default I18n value Rails generator should humanize enum key for default I18n value Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant