diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-03-23 13:04:09 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-03-23 13:04:09 -0700 |
commit | bad0b81a0736cd81f36541cff47d51a1b0e44fda (patch) | |
tree | 92f196ba95cc0b28bf135609212213bb5b107a95 /activerecord/lib | |
parent | 9e8b7d9d5bb3537f113fbda2a1720c5f412fbe62 (diff) | |
parent | 36a45230dac4546b71b145681cf553a5a4f9eccb (diff) | |
download | rails-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')
-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 |