Module: ActiveRecord::Delegation::ClassSpecificRelation

Extended by:
ActiveSupport::Concern
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/active_record/relation/delegation.rb

Overview

:nodoc:

Defined Under Namespace

Modules: ClassMethods

Method Summary

Methods included from ActiveSupport::Concern

append_features, class_methods, extended, included, prepend_features, prepended

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object (private)



105
106
107
108
109
110
111
112
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/active_record/relation/delegation.rb', line 105

def method_missing(method, *args, &block)
  if @klass.respond_to?(method)
    @klass.generate_relation_method(method)
    scoping { @klass.public_send(method, *args, &block) }
  else
    super
  end
end