lib/can_search/search_scopes.rb
# Adds a new scope for the given model.  It works by looking up the scope class
# in the scope_types hash and instantiating it with the given arguments.
Adds a new scope for the given model.  It works by looking up the scope class
in the scope_types hash and instantiating it with the given arguments.
Adds a new scope for the given model . It works by looking up the scope class in the scope_types hash and instantiating it with the given arguments .
def scoped_by(name, options = {})
      options[:scope] ||= :reference
      if scope_class = self.class.scope_types[options[:scope]]
        @scopes[name] = scope_class.new(@model, name, options)
      end
    end
def scoped_by ( name , options = { } ) options [ :scope ] ||= :reference if scope_class = self . class . scope_types [ options [ :scope ] ] @scopes [ name ] = scope_class . new ( @model , name , options ) end end
Adds a new scope for the given model.
Adds a new scope for the given model .
name
<not_specific>
options
<not_specific>