instance method method_missing

Ruby on Rails 3.2.22.5

Since v3.2.22.5 Last seen in v3.2.22.5

Signature

method_missing(method, *args, &block)

No documentation comment.

Parameters

method req
args rest
block block
Source
# File activerecord/lib/active_record/relation/delegation.rb, line 34
    def method_missing(method, *args, &block)
      if @klass.respond_to?(method)
        ::ActiveRecord::Delegation.delegate_to_scoped_klass(method)
        scoping { @klass.send(method, *args, &block) }
      elsif Array.method_defined?(method)
        ::ActiveRecord::Delegation.delegate method, :to => :to_a
        to_a.send(method, *args, &block)
      elsif arel.respond_to?(method)
        ::ActiveRecord::Delegation.delegate method, :to => :arel
        arel.send(method, *args, &block)
      else
        super
      end
    end

Defined in activerecord/lib/active_record/relation/delegation.rb line 34 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::Delegation

Type at least 2 characters to search.

↑↓ navigate · open · esc close