Flowdock
method

delegate_to_scoped_klass

Importance_0
v3.2.3 - Show latest stable - 0 notes - Class: Delegation
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.