method
method_missing
v2.2.1 -
Show latest stable
- Class:
ActiveRecord::NamedScope::Scope
method_missing(method, *args, &block)private
No documentation available.
# File activerecord/lib/active_record/named_scope.rb, line 165
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
proxy_scope.send(method, *args, &block)
end
end
end