aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorNeeraj Singh <neerajdotname@gmail.com>2013-03-23 14:58:21 -0400
committerNeeraj Singh <neerajdotname@gmail.com>2013-03-23 15:00:05 -0400
commita1a2951518b2a4249101ebc87694800a345512f7 (patch)
treeb45d7f49f71b2296a66d5b88dfc804ac3b03edb9 /activerecord/lib/active_record
parent7a872e9d84be2f0205d8ca811698be92195ef0e1 (diff)
downloadrails-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')
-rw-r--r--activerecord/lib/active_record/scoping/default.rb8
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