Update Globalize monkey-patch to forward kw args
This method changed in Globalize version 6.0.1 [1], which we're using since
commit 6072372c9d.
We were getting a deprecation warning in Ruby 2.7:
```
config/initializers/globalize.rb:8: warning: Using the last argument as
keyword parameters is deprecated; maybe ** should be added to the call
```
So we're using the `(...)` arguments syntax to make it compatible with
Ruby 3.0, just like Globalize does when using Ruby 2.7.
[1] See pull request 778 in the globalize/globalize GitHub repo.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
module Globalize
|
||||
module ActiveRecord
|
||||
module InstanceMethods
|
||||
def save(*)
|
||||
def save(...)
|
||||
# Credit for this code belongs to Jack Tomaszewski:
|
||||
# https://github.com/globalize/globalize/pull/578
|
||||
Globalize.with_locale(Globalize.locale || I18n.default_locale) do
|
||||
|
||||
Reference in New Issue
Block a user