diff options
author | Zack Hobson <zack@opensourcery.com> | 2009-02-13 11:23:24 -0800 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2009-02-27 14:43:11 +0100 |
commit | ff894b55dd787af1d6284567f2a898090aae64ca (patch) | |
tree | bdaa3721b0f049e2f25ce37f73fa48db25ccc9b7 | |
parent | 319106d09c0ec2daf8b5345f525f1c97b6368ce2 (diff) | |
download | rails-ff894b55dd787af1d6284567f2a898090aae64ca.tar.gz rails-ff894b55dd787af1d6284567f2a898090aae64ca.tar.bz2 rails-ff894b55dd787af1d6284567f2a898090aae64ca.zip |
Update rdoc: all is not a named_scope [#1959 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
-rw-r--r-- | activerecord/lib/active_record/named_scope.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/named_scope.rb b/activerecord/lib/active_record/named_scope.rb index 022fdaf9b2..8a7449f95b 100644 --- a/activerecord/lib/active_record/named_scope.rb +++ b/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 |