russian icon indicating copy to clipboard operation
russian copied to clipboard

Ruby 3.0 support

Open me-kirill opened this issue 4 years ago • 1 comments

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

me-kirill avatar Jan 26 '21 13:01 me-kirill

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

ExplosiveGM avatar Mar 09 '21 02:03 ExplosiveGM