instance method
method_missing
Ruby on Rails 3.1.12
Since v3.0.20 Last seen in v3.1.12Available in: v3.0.20 v3.1.12
Signature
method_missing(method, *args, &block)
No documentation comment.
Parameters
-
methodreq -
argsrest -
blockblock
Source
# File activerecord/lib/active_record/relation.rb, line 452
def method_missing(method, *args, &block)
if Array.method_defined?(method)
to_a.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 452
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Relation