From 408437334bcb5df8d8daf7b60c13d496222954d2 Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Sun, 22 Apr 2012 08:58:13 +0200 Subject: giving a hash to default scope should not be deprecated (well, not for this reason) --- activerecord/lib/active_record/scoping/default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/scoping/default.rb') 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 " \ -- cgit v1.2.3