Skip to content
This repository
Browse code

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...
commit a1a2951518b2a4249101ebc87694800a345512f7 1 parent 7a872e9
Neeraj Singh neerajdotname authored

Showing 1 changed file with 0 additions and 8 deletions. Show diff stats Hide diff stats

  1. +0 8 activerecord/lib/active_record/scoping/default.rb
8 activerecord/lib/active_record/scoping/default.rb
@@ -27,14 +27,6 @@ module ClassMethods
27 27 # Post.unscoped {
28 28 # Post.limit(10) # Fires "SELECT * FROM posts LIMIT 10"
29 29 # }
30   - #
31   - # It is recommended that you use the block form of unscoped because
32   - # chaining unscoped with +scope+ does not work. Assuming that
33   - # +published+ is a +scope+, the following two statements
34   - # are equal: the +default_scope+ is applied on both.
35   - #
36   - # Post.unscoped.published
37   - # Post.published
38 30 def unscoped
39 31 block_given? ? relation.scoping { yield } : relation
40 32 end

0 comments on commit a1a2951

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