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, *args, &block) ⇒ Object (private)



105
106
107
108
109
110
111
112
# File '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