From 0d8d4db41f5aff721072cb6a7d83eddd8ddaa0b2 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Wed, 3 Nov 2021 10:02:56 +0000 Subject: [PATCH] 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 --- lib/spree/core/delegate_belongs_to.rb | 2 +- lib/spree/i18n.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/spree/core/delegate_belongs_to.rb b/lib/spree/core/delegate_belongs_to.rb index f2e4fda770..811a8d796d 100644 --- a/lib/spree/core/delegate_belongs_to.rb +++ b/lib/spree/core/delegate_belongs_to.rb @@ -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 diff --git a/lib/spree/i18n.rb b/lib/spree/i18n.rb index d40dab6147..69242c3d07 100644 --- a/lib/spree/i18n.rb +++ b/lib/spree/i18n.rb @@ -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