Module: ActiveRecord::Delegation

Extended by:
ActiveSupport::Concern
Included in:
Relation
Defined in:
lib/active_record/relation/delegation.rb

Overview

:nodoc:

Defined Under Namespace

Modules: ClassMethods, ClassSpecificRelation, DelegateCache

Class Method Summary collapse

Class Method Details

.delegated_classesObject



9
10
11
12
13
14
15
16
# File 'lib/active_record/relation/delegation.rb', line 9

def delegated_classes
  [
    ActiveRecord::Relation,
    ActiveRecord::Associations::CollectionProxy,
    ActiveRecord::AssociationRelation,
    ActiveRecord::DisableJoinsAssociationRelation,
  ]
end

.uncacheable_methodsObject



18
19
20
21
22
# File 'lib/active_record/relation/delegation.rb', line 18

def uncacheable_methods
  @uncacheable_methods ||= (
    delegated_classes.flat_map(&:public_instance_methods) - ActiveRecord::Relation.public_instance_methods
  ).to_set.freeze
end