aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-03-23 13:04:09 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-03-23 13:04:09 -0700
commitbad0b81a0736cd81f36541cff47d51a1b0e44fda (patch)
tree92f196ba95cc0b28bf135609212213bb5b107a95 /activerecord/lib/active_record
parent9e8b7d9d5bb3537f113fbda2a1720c5f412fbe62 (diff)
parent36a45230dac4546b71b145681cf553a5a4f9eccb (diff)
downloadrails-bad0b81a0736cd81f36541cff47d51a1b0e44fda.tar.gz
rails-bad0b81a0736cd81f36541cff47d51a1b0e44fda.tar.bz2
rails-bad0b81a0736cd81f36541cff47d51a1b0e44fda.zip
Merge pull request #9889 from neerajdotname/unscoped
Unscoped works with other named scope even 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