mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user