diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-04-19 18:19:25 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2019-04-19 18:21:31 +0900 |
commit | 607d77ab073581172a66b26e2807790cd723719e (patch) | |
tree | 640eac581c98422f33095e2a43121c09cc572f41 /activerecord/lib/active_record | |
parent | 2733a68f8b8a0b3ce785d516b0f577b5693cf64b (diff) | |
download | rails-607d77ab073581172a66b26e2807790cd723719e.tar.gz rails-607d77ab073581172a66b26e2807790cd723719e.tar.bz2 rails-607d77ab073581172a66b26e2807790cd723719e.zip |
Give GeneratedRelationMethods module a name
This follows #35595.
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/relation/delegation.rb | 5 |
1 files changed, 4 insertions, 1 deletions
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 |