Module: ActiveRecord::Delegation::ClassSpecificRelation

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

Overview

:nodoc:

Defined Under Namespace

Modules: ClassMethods

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method) ⇒ Object (private)



115
116
117
118
119
120
121
122
123
124
# File 'lib/active_record/relation/delegation.rb', line 115

def method_missing(method, ...)
  if @klass.respond_to?(method)
    unless Delegation.uncacheable_methods.include?(method)
      @klass.generate_relation_method(method)
    end
    scoping { @klass.public_send(method, ...) }
  else
    super
  end
end