diff options
author | Neeraj Singh <neerajdotname@gmail.com> | 2013-03-23 14:58:21 -0400 |
---|---|---|
committer | Neeraj Singh <neerajdotname@gmail.com> | 2013-03-23 15:00:05 -0400 |
commit | a1a2951518b2a4249101ebc87694800a345512f7 (patch) | |
tree | b45d7f49f71b2296a66d5b88dfc804ac3b03edb9 /activerecord/lib/active_record/scoping | |
parent | 7a872e9d84be2f0205d8ca811698be92195ef0e1 (diff) | |
download | rails-a1a2951518b2a4249101ebc87694800a345512f7.tar.gz rails-a1a2951518b2a4249101ebc87694800a345512f7.tar.bz2 rails-a1a2951518b2a4249101ebc87694800a345512f7.zip |
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
Diffstat (limited to 'activerecord/lib/active_record/scoping')
-rw-r--r-- | activerecord/lib/active_record/scoping/default.rb | 8 |
1 files changed, 0 insertions, 8 deletions
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 |