123456789_123456789_123456789_123456789_123456789_

Module: ActiveRecord::Delegation

Do not use. This module is for internal use only.
Relationships & Source Files
Namespace Children
Modules:
Classes:
Extension / Inclusion / Inheritance Descendants
Included In:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Defined in: activerecord/lib/active_record/relation/delegation.rb

Class Method Summary

::ActiveSupport::Concern - Extended

class_methods

Define class methods from given block.

included

Evaluate given block in context of base class, so that you can write class macros here.

prepended

Evaluate given block in context of base class, so that you can write class macros here.

append_features, prepend_features

Instance Attribute Summary

Instance Method Summary

Class Method Details

.delegated_classes

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 8

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

.uncacheable_methods

[ GitHub ]

  
# File 'activerecord/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

Instance Attribute Details

#compact (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records

#connection (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 103

delegate :primary_key, :connection, :transaction, to: :klass

#each (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records

#encode_with (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records

#in_groups (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records

#in_groups_of (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records

#index (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records

#join (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records

#length (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records

#primary_key (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 103

delegate :primary_key, :connection, :transaction, to: :klass

#reverse (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records

#rindex (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records

#rotate (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records

#sample (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records

#shuffle (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records

#slice (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records

#split (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records

#transaction (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 103

delegate :primary_key, :connection, :transaction, to: :klass

Instance Method Details

#&

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records

#+

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records

#-

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records

#[]

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records

#as_json

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records

#intersect?Boolean

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records

#respond_to_missing?(method, _) ⇒ Boolean (private)

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 139

def respond_to_missing?(method, _)
  super || @klass.respond_to?(method)
end

#to_formatted_s

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records

#to_fs

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records

#to_sentence

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records

#to_xml

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records

#|

[ GitHub ]

  
# File 'activerecord/lib/active_record/relation/delegation.rb', line 98

delegate :to_xml, :encode_with, :length, :each, :join, :intersect?,
         :[], :&, :|, :+, :-, :sample, :reverse, :rotate, :compact, :in_groups, :in_groups_of,
         :to_sentence, :to_fs, :to_formatted_s, :as_json,
         :shuffle, :split, :slice, :index, :rindex, to: :records