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 101

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 106

delegate :primary_key, :with_connection, :connection, :table_name, :transaction, :sanitize_sql_like, :unscoped, :name, to: :model

#each (readonly)

[ GitHub ]

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

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 101

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 101

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 101

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 101

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 101

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 101

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

#name (readonly)

[ GitHub ]

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

delegate :primary_key, :with_connection, :connection, :table_name, :transaction, :sanitize_sql_like, :unscoped, :name, to: :model

#primary_key (readonly)

[ GitHub ]

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

delegate :primary_key, :with_connection, :connection, :table_name, :transaction, :sanitize_sql_like, :unscoped, :name, to: :model

#reverse (readonly)

[ GitHub ]

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

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 101

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 101

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 101

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

#sanitize_sql_like (readonly)

[ GitHub ]

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

delegate :primary_key, :with_connection, :connection, :table_name, :transaction, :sanitize_sql_like, :unscoped, :name, to: :model

#shuffle (readonly)

[ GitHub ]

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

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 101

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 101

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

#table_name (readonly)

[ GitHub ]

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

delegate :primary_key, :with_connection, :connection, :table_name, :transaction, :sanitize_sql_like, :unscoped, :name, to: :model

#transaction (readonly)

[ GitHub ]

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

delegate :primary_key, :with_connection, :connection, :table_name, :transaction, :sanitize_sql_like, :unscoped, :name, to: :model

#unscoped (readonly)

[ GitHub ]

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

delegate :primary_key, :with_connection, :connection, :table_name, :transaction, :sanitize_sql_like, :unscoped, :name, to: :model

#with_connection (readonly)

[ GitHub ]

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

delegate :primary_key, :with_connection, :connection, :table_name, :transaction, :sanitize_sql_like, :unscoped, :name, to: :model

Instance Method Details

#&

[ GitHub ]

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

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 101

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 101

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 101

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 101

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 101

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 150

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

#to_formatted_s

[ GitHub ]

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

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 101

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 101

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 101

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 101

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