mirror of
https://github.com/github/rails.git
synced 2026-01-28 07:48:00 -05:00
Added Errors#any? to mean !Errors#empty? [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3510 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
*SVN*
|
||||
|
||||
* Added Errors#any? to mean !Errors#empty? [DHH]
|
||||
|
||||
* Support the :column option for remove_index with the PostgreSQL adapter. #3661 [shugo@ruby-lang.org]
|
||||
|
||||
* Add documentation for add_index and remove_index. #3600 [Manfred Stienstra <m.stienstra@fngtps.com>]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user