instance method method_missing

Ruby on Rails 3.0.20

Since v3.0.20 Last seen in v3.1.12

Available in: v3.0.20 v3.1.12

Signature

method_missing(method, *args, &block)

No documentation comment.

Parameters

method req
args rest
block block
Source
# File activerecord/lib/active_record/relation.rb, line 364
    def method_missing(method, *args, &block)
      if Array.method_defined?(method)
        to_a.send(method, *args, &block)
      elsif @klass.scopes[method]
        merge(@klass.send(method, *args, &block))
      elsif @klass.respond_to?(method)
        scoping { @klass.send(method, *args, &block) }
      elsif arel.respond_to?(method)
        arel.send(method, *args, &block)
      else
        super
      end
    end

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

Defined in ActiveRecord::Relation

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close