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

Ruby 3.0 support #68

Open
benone opened this issue Jan 26, 2021 · 1 comment · May be fixed by #69
Open

Ruby 3.0 support #68

benone opened this issue Jan 26, 2021 · 1 comment · May be fixed by #69

Comments

@benone
Copy link

benone commented Jan 26, 2021

For ruby 3.0 support:
https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/

Params to I18n should be passed this way:

  def translate(key, options = {})
    I18n.translate(key,   **options.merge({ :locale => LOCALE }))
  end        
  
  def localize(object, options = {})
    I18n.localize(object, **options.merge({ :locale => LOCALE }))
  end
@ExplosiveGM
Copy link

This problem in _custom_error_message.rb:45:in full_messages too
I18n.t(:"errors.format", options.merge(:message => m))
must be changed to
I18n.t(:"errors.format", **options.merge(message: m)
It is deprecated but works

@flood4life flood4life linked a pull request Aug 3, 2021 that will close this issue
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.

2 participants