diff options
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-x | activerecord/lib/active_record/validations.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb index 27ca8d37d1..30f41530b0 100755 --- a/activerecord/lib/active_record/validations.rb +++ b/activerecord/lib/active_record/validations.rb @@ -147,6 +147,11 @@ module ActiveRecord def empty? return @errors.empty? end + + # Returns true if errors have been added. + def any? + !empty? + end # Removes all the errors that have been added. def clear |