diff options
author | Jon Leighton <j@jonathanleighton.com> | 2012-04-22 08:58:13 +0200 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2012-04-25 15:45:05 +0100 |
commit | 408437334bcb5df8d8daf7b60c13d496222954d2 (patch) | |
tree | 31057fef8f1ad814735d6220455cdb4db2f6daf4 /activerecord/lib | |
parent | 2970e3f05454304b4fd0e58581b49665001cb68a (diff) | |
download | rails-408437334bcb5df8d8daf7b60c13d496222954d2.tar.gz rails-408437334bcb5df8d8daf7b60c13d496222954d2.tar.bz2 rails-408437334bcb5df8d8daf7b60c13d496222954d2.zip |
giving a hash to default scope should not be deprecated (well, not for this reason)
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/scoping/default.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/scoping/default.rb b/activerecord/lib/active_record/scoping/default.rb index 45c34005c3..c887a106ef 100644 --- a/activerecord/lib/active_record/scoping/default.rb +++ b/activerecord/lib/active_record/scoping/default.rb @@ -90,7 +90,7 @@ module ActiveRecord def default_scope(scope = {}) scope = Proc.new if block_given? - if scope.is_a?(Relation) || !scope.respond_to?(:call) + if scope.is_a?(Relation) || !scope.is_a?(Hash) && !scope.respond_to?(:call) ActiveSupport::Deprecation.warn( "Calling #default_scope without a block is deprecated. For example instead " \ "of `default_scope where(color: 'red')`, please use " \ |