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:
parent
bd69589143
commit
a4eab8f1f3
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue