mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
unscoped takes care of named_scopes too
This commit is contained in:
parent
f044d38192
commit
c8ab3992f8
1 changed files with 1 additions and 2 deletions
|
@ -852,8 +852,7 @@ module ActiveRecord #:nodoc:
|
|||
# limit(10) # Fires "SELECT * FROM posts LIMIT 10"
|
||||
# }
|
||||
#
|
||||
# It is recommended to use block form of unscoped because chaining unscoped with <tt>named_scope</tt>
|
||||
# does not work. Assuming that <tt>published</tt> is a <tt>named_scope</tt> following two statements are same.
|
||||
# Assuming that <tt>published</tt> is a <tt>named_scope</tt> following two statements are same.
|
||||
#
|
||||
# Post.unscoped.published
|
||||
# Post.published
|
||||
|
|
Loading…
Reference in a new issue