From 2ada222f1edbc827a1c06bdb3110d7a0ee808a24 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 30 Apr 2019 16:54:40 -0500 Subject: any? should be delegated to the errors list Otherwise we get deprecation warnings in the generated scaffold template files --- activemodel/lib/active_model/errors.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activemodel/lib') diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb index fd87d3c9bc..d7bcfacce3 100644 --- a/activemodel/lib/active_model/errors.rb +++ b/activemodel/lib/active_model/errors.rb @@ -64,7 +64,7 @@ module ActiveModel include Enumerable extend Forwardable - def_delegators :@errors, :size, :clear, :blank?, :empty?, :uniq! + def_delegators :@errors, :size, :clear, :blank?, :empty?, :uniq!, :any? # TODO: forward all enumerable methods after `each` deprecation is removed. def_delegators :@errors, :count -- cgit v1.2.3