mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Update example of default_scope to use the new arel finder syntax
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user