1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Update example of default_scope to use the new arel finder syntax

This commit is contained in:
David Heinemeier Hansson 2010-03-28 19:11:06 -07:00
parent bd69589143
commit a4eab8f1f3

View file

@ -1290,7 +1290,7 @@ module ActiveRecord #:nodoc:
# <tt>options</tt> argument is the same as in find.
#
# class Person < ActiveRecord::Base
# default_scope :order => 'last_name, first_name'
# default_scope order('last_name, first_name')
# end
def default_scope(options = {})
self.default_scoping << construct_finder_arel(options)