Skip to content
Browse files

Update documentation for default_scope

  • Loading branch information...
1 parent 0f7207f commit c942eccfa00b4be3d10b9b9629879d5ea7185122 @mernen mernen committed Dec 1, 2008
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/base.rb
View
4 activerecord/lib/active_record/base.rb
@@ -2052,10 +2052,10 @@ def subclasses #:nodoc:
end
# Sets the default options for the model. The format of the
- # <tt>method_scoping</tt> argument is the same as in with_scope.
+ # <tt>options</tt> argument is the same as in find.
#
# class Person < ActiveRecord::Base
- # default_scope :find => { :order => 'last_name, first_name' }
+ # default_scope :order => 'last_name, first_name'
# end
def default_scope(options = {})
self.default_scoping << { :find => options, :create => (options.is_a?(Hash) && options.has_key?(:conditions)) ? options[:conditions] : {} }

0 comments on commit c942ecc

Please sign in to comment.
Something went wrong with that request. Please try again.