1
0
Fork 0
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:
Neeraj Singh 2010-11-17 21:46:55 -05:00 committed by Xavier Noria
parent f044d38192
commit c8ab3992f8

View file

@ -852,8 +852,7 @@ module ActiveRecord #:nodoc:
# limit(10) # Fires "SELECT * FROM posts LIMIT 10" # 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> # Assuming that <tt>published</tt> is a <tt>named_scope</tt> following two statements are same.
# does not work. Assuming that <tt>published</tt> is a <tt>named_scope</tt> following two statements are same.
# #
# Post.unscoped.published # Post.unscoped.published
# Post.published # Post.published