From 1b17faf78fb6c46f957ef585bbb371f6566e87cd Mon Sep 17 00:00:00 2001 From: Marc Rohloff Date: Mon, 24 Aug 2020 15:48:50 -0600 Subject: [PATCH] Don't combine splat and hash, just use the attribute form --- core/app/models/concerns/spree/user_address_book.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/app/models/concerns/spree/user_address_book.rb b/core/app/models/concerns/spree/user_address_book.rb index ee68c42acd1..20a90a1bbed 100644 --- a/core/app/models/concerns/spree/user_address_book.rb +++ b/core/app/models/concerns/spree/user_address_book.rb @@ -5,7 +5,7 @@ module UserAddressBook extend ActiveSupport::Concern included do - has_many :user_addresses, -> { active }, **{ foreign_key: "user_id", class_name: "Spree::UserAddress" } do + has_many :user_addresses, -> { active }, foreign_key: "user_id", class_name: "Spree::UserAddress" do def find_first_by_address_values(address_attrs) detect { |ua| ua.address == Spree::Address.new(address_attrs) } end