mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
unscoped takes care of named_scopes too
This commit is contained in:
@@ -856,8 +856,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
|
||||
|
||||
Reference in New Issue
Block a user