Flowdock
method

delegate_to_scoped_klass

Importance_0
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: Delegation

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.2.13) is shown here.

delegate_to_scoped_klass(method) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/relation/delegation.rb, line 10
    def self.delegate_to_scoped_klass(method)
      if method.to_s =~ /\A[a-zA-Z_]\w*[!?]?\z/
        module_eval           def #{method}(*args, &block)            scoping { @klass.#{method}(*args, &block) }          end, __FILE__, __LINE__ + 1
      else
        module_eval           def #{method}(*args, &block)            scoping { @klass.send(#{method.inspect}, *args, &block) }          end, __FILE__, __LINE__ + 1
      end
    end
Register or log in to add new notes.