From a1a2951518b2a4249101ebc87694800a345512f7 Mon Sep 17 00:00:00 2001 From: Neeraj Singh Date: Sat, 23 Mar 2013 14:58:21 -0400 Subject: 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 --- activerecord/lib/active_record/scoping/default.rb | 8 -------- 1 file changed, 8 deletions(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/scoping/default.rb b/activerecord/lib/active_record/scoping/default.rb index 5bd481082e..cde4f29d08 100644 --- a/activerecord/lib/active_record/scoping/default.rb +++ b/activerecord/lib/active_record/scoping/default.rb @@ -27,14 +27,6 @@ module ActiveRecord # 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 -- cgit v1.2.3