Fix keyword args deprecations

/home/runner/work/openfoodnetwork/openfoodnetwork/lib/spree/core/delegate_belongs_to.rb:75: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call

/home/runner/work/openfoodnetwork/openfoodnetwork/lib/spree/i18n.rb:20: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
This commit is contained in:
Matt-Yorkley
2021-11-03 10:02:56 +00:00
parent 68542ce2b6
commit 0d8d4db41f
2 changed files with 3 additions and 3 deletions

View File

@@ -72,7 +72,7 @@ module DelegateBelongsTo
raise 'Illegal or unimplemented association type.'
end
__send__(type, association, opts) if reflect_on_association(association).nil?
__send__(type, association, **opts) if reflect_on_association(association).nil?
end
private

View File

@@ -16,8 +16,8 @@ module Spree
options = args.extract_options!
options[:scope] = [*options[:scope]].unshift(:spree).uniq
args << options
super(*args)
super(*args, **options)
end
alias_method :t, :translate