instance method
method_missing
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v2.3.18 PrivateAvailable in: v2.2.3 v2.3.18
Signature
method_missing(method, *args, &block)
No documentation comment.
Parameters
-
methodreq -
argsrest -
blockblock
Source
# File activerecord/lib/active_record/named_scope.rb, line 168
def method_missing(method, *args, &block)
if scopes.include?(method)
scopes[method].call(self, *args)
else
with_scope :find => proxy_options, :create => proxy_options[:conditions].is_a?(Hash) ? proxy_options[:conditions] : {} do
method = :new if method == :build
if current_scoped_methods_when_defined
with_scope current_scoped_methods_when_defined do
proxy_scope.send(method, *args, &block)
end
else
proxy_scope.send(method, *args, &block)
end
end
end
end
Defined in activerecord/lib/active_record/named_scope.rb line 168
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::NamedScope::Scope