diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-19 15:07:44 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-19 15:07:44 -0700 |
commit | e68f339aae4d3bc1bcf46b65cb8dcddc0ad2a435 (patch) | |
tree | e6e2beee0e388075041519eb12cb80a9bd761b84 /activerecord/lib | |
parent | b1b26af9a2f1c2037f7c2167d747ed33cc639763 (diff) | |
download | rails-e68f339aae4d3bc1bcf46b65cb8dcddc0ad2a435.tar.gz rails-e68f339aae4d3bc1bcf46b65cb8dcddc0ad2a435.tar.bz2 rails-e68f339aae4d3bc1bcf46b65cb8dcddc0ad2a435.zip |
default scope can accept any object that responds to #call
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 879f02ff6a..6720f0687a 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1145,7 +1145,7 @@ MSG def current_scoped_methods #:nodoc: method = scoped_methods.last if method.respond_to?(:call) - unscoped(&method) + relation.scoping { method.call } else method end |