Skip to content
Browse files

unscoped works with named scope [ci skip]

Update comment to reflect that unscoped works with named scope
even when named scope is using without block form
  • Loading branch information...
1 parent 7a872e9 commit a1a2951518b2a4249101ebc87694800a345512f7 Neeraj Singh committed Mar 23, 2013
Showing with 0 additions and 8 deletions.
  1. +0 −8 activerecord/lib/active_record/scoping/default.rb
View
8 activerecord/lib/active_record/scoping/default.rb
@@ -27,14 +27,6 @@ module ClassMethods
# Post.unscoped {
# Post.limit(10) # Fires "SELECT * FROM posts LIMIT 10"
# }
- #
- # It is recommended that you use the block form of unscoped because
- # chaining unscoped with +scope+ does not work. Assuming that
- # +published+ is a +scope+, the following two statements
- # are equal: the +default_scope+ is applied on both.
- #
- # Post.unscoped.published
- # Post.published
def unscoped
block_given? ? relation.scoping { yield } : relation
end

0 comments on commit a1a2951

Please sign in to comment.
Something went wrong with that request. Please try again.