Module: ActiveRecord::Delegation

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

Overview

:nodoc:

Defined Under Namespace

Modules: ClassMethods, ClassSpecificRelation, DelegateCache

Class Method Summary collapse

Methods included from ActiveSupport::Concern

append_features, class_methods, extended, included, prepend_features, prepended

Class Method Details

.delegated_classesObject



9
10
11
12
13
14
15
16
# File 'activerecord/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 'activerecord/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