diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-04-04 00:07:45 +0100 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-04-12 19:46:04 -0700 |
commit | 5740d4ec0c16d68b82f440e74fd8b74ae3fe48e6 (patch) | |
tree | e8f0dff39f96658699b66749b4a257ba8ccfda9f /activerecord/lib/active_record/named_scope.rb | |
parent | fc9a04b6a69d6821a6f1601e3e0dd518300fa138 (diff) | |
download | rails-5740d4ec0c16d68b82f440e74fd8b74ae3fe48e6.tar.gz rails-5740d4ec0c16d68b82f440e74fd8b74ae3fe48e6.tar.bz2 rails-5740d4ec0c16d68b82f440e74fd8b74ae3fe48e6.zip |
Deprecated support for passing hashes and relations to default_scope, in favour of defining a 'default_scope' class method in the model. See the CHANGELOG for more details.
Diffstat (limited to 'activerecord/lib/active_record/named_scope.rb')
-rw-r--r-- | activerecord/lib/active_record/named_scope.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/named_scope.rb b/activerecord/lib/active_record/named_scope.rb index d5fff65303..a398476dd6 100644 --- a/activerecord/lib/active_record/named_scope.rb +++ b/activerecord/lib/active_record/named_scope.rb @@ -35,7 +35,7 @@ module ActiveRecord if options scoped.apply_finder_options(options) else - current_scoped_methods ? relation.merge(current_scoped_methods) : relation.clone + (current_scope || relation).clone end end |