Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update rdoc: all is not a named_scope [#1959 state:committed]

Signed-off-by: David Heinemeier Hansson <>
  • Loading branch information...
commit ff894b55dd787af1d6284567f2a898090aae64ca 1 parent 319106d
Zack Hobson authored dhh committed
Showing with 3 additions and 2 deletions.
  1. +3 −2 activerecord/lib/active_record/named_scope.rb
5 activerecord/lib/active_record/named_scope.rb
@@ -1,11 +1,12 @@
module ActiveRecord
module NamedScope
- # All subclasses of ActiveRecord::Base have two named \scopes:
- # * <tt>all</tt> - which is similar to a <tt>find(:all)</tt> query, and
+ # All subclasses of ActiveRecord::Base have one named scope:
# * <tt>scoped</tt> - which allows for the creation of anonymous \scopes, on the fly: <tt>Shirt.scoped(:conditions => {:color => 'red'}).scoped(:include => :washing_instructions)</tt>
# These anonymous \scopes tend to be useful when procedurally generating complex queries, where passing
# intermediate values (scopes) around as first-class objects is convenient.
+ #
+ # You can define a scope that applies to all finders using ActiveRecord::Base.default_scope.
def self.included(base)
base.class_eval do
extend ClassMethods
Please sign in to comment.
Something went wrong with that request. Please try again.