From d79ad3f8905654ce02d2d505b6a3be95699ffe5c Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Fri, 13 Sep 2019 10:43:29 +0900 Subject: [PATCH] Fix ArgumentError: wrong number of arguments (given 3, expected 2) --- activerecord/lib/active_record/association_relation.rb | 2 +- activerecord/lib/active_record/associations/collection_proxy.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/activerecord/lib/active_record/association_relation.rb b/activerecord/lib/active_record/association_relation.rb index de9892e48d..bc02ffb121 100644 --- a/activerecord/lib/active_record/association_relation.rb +++ b/activerecord/lib/active_record/association_relation.rb @@ -2,7 +2,7 @@ module ActiveRecord class AssociationRelation < Relation - def initialize(klass, association) + def initialize(klass, association, **) super(klass) @association = association end diff --git a/activerecord/lib/active_record/associations/collection_proxy.rb b/activerecord/lib/active_record/associations/collection_proxy.rb index f0b75306e9..0b82c46e26 100644 --- a/activerecord/lib/active_record/associations/collection_proxy.rb +++ b/activerecord/lib/active_record/associations/collection_proxy.rb @@ -27,7 +27,7 @@ module ActiveRecord # is computed directly through SQL and does not trigger by itself the # instantiation of the actual post records. class CollectionProxy < Relation - def initialize(klass, association) #:nodoc: + def initialize(klass, association, **) #:nodoc: @association = association super klass