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

Address new syntax in Rails 7.0 #51

Merged
merged 2 commits into from
Apr 27, 2022
Merged

Conversation

mishina2228
Copy link
Contributor

@mishina2228 mishina2228 commented Jan 25, 2022

Summary

This PR addresses new syntax introduced in Rails 7.0.
Also fixes the locale of spec/fixtures/locales/en.yml to prevent CI from failing.

Repro

class User < ActiveRecord::Base
  enum :gender, [:male, :female], default: :male
end

User.genders_i18n

Before:

NoMethodError:
  undefined method `genders_i18n' for User:Class
  Did you mean?  genders

After:

{"male"=>"Male", "female"=>"Female"}

This was referenced Jan 25, 2022
@zmbacker zmbacker merged commit 0c35535 into zmbacker:master Apr 27, 2022
@mishina2228 mishina2228 deleted the new-syntax branch April 28, 2022 13:43
@mishina2228
Copy link
Contributor Author

Thanks! @zmbacker

@zmbacker
Copy link
Owner

Thanks! @zmbacker

Thanks for your contribution.

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 this pull request may close these issues.

2 participants