module ActiveRecord::NamedScope

def self.included(base)

You can define a scope that applies to all finders using ActiveRecord::Base.default_scope.

intermediate values (scopes) around as first-class objects is convenient.
These anonymous \scopes tend to be useful when procedurally generating complex queries, where passing

* scoped - which allows for the creation of anonymous \scopes, on the fly: Shirt.scoped(:conditions => {:color => 'red'}).scoped(:include => :washing_instructions)
All subclasses of ActiveRecord::Base have one named scope:
def self.included(base)
  base.extend ClassMethods
end