From 607d77ab073581172a66b26e2807790cd723719e Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Fri, 19 Apr 2019 18:19:25 +0900 Subject: Give GeneratedRelationMethods module a name This follows #35595. --- activerecord/lib/active_record/relation/delegation.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/relation/delegation.rb b/activerecord/lib/active_record/relation/delegation.rb index 7a53a9d1c7..d59331053e 100644 --- a/activerecord/lib/active_record/relation/delegation.rb +++ b/activerecord/lib/active_record/relation/delegation.rb @@ -45,7 +45,10 @@ module ActiveRecord private def generated_relation_methods - @generated_relation_methods ||= GeneratedRelationMethods.new + @generated_relation_methods ||= GeneratedRelationMethods.new.tap do |mod| + const_set(:GeneratedRelationMethods, mod) + private_constant :GeneratedRelationMethods + end end end -- cgit v1.2.3