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



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

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

.uncacheable_methodsObject



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

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