diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2019-04-30 16:54:40 -0500 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2019-04-30 16:54:40 -0500 |
commit | 2ada222f1edbc827a1c06bdb3110d7a0ee808a24 (patch) | |
tree | e31a7a095cc262c3534565eb2e6bad5d5e703e7d /activemodel/lib/active_model | |
parent | 681b0c1f2a2a51becad928ff157d59082ce5c1bd (diff) | |
download | rails-2ada222f1edbc827a1c06bdb3110d7a0ee808a24.tar.gz rails-2ada222f1edbc827a1c06bdb3110d7a0ee808a24.tar.bz2 rails-2ada222f1edbc827a1c06bdb3110d7a0ee808a24.zip |
any? should be delegated to the errors list
Otherwise we get deprecation warnings in the generated scaffold template files
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r-- | activemodel/lib/active_model/errors.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |