aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/scoping/default.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-04-22 08:58:13 +0200
committerJon Leighton <j@jonathanleighton.com>2012-04-25 15:45:05 +0100
commit408437334bcb5df8d8daf7b60c13d496222954d2 (patch)
tree31057fef8f1ad814735d6220455cdb4db2f6daf4 /activerecord/lib/active_record/scoping/default.rb
parent2970e3f05454304b4fd0e58581b49665001cb68a (diff)
downloadrails-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/active_record/scoping/default.rb')
-rw-r--r--activerecord/lib/active_record/scoping/default.rb2
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 " \