mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix ActiveModel::Errors#has_key? return value
This commit is contained in:
parent
1c2c552703
commit
b97035df64
1 changed files with 1 additions and 1 deletions
|
@ -94,7 +94,7 @@ module ActiveModel
|
|||
# person.errors.include?(:name) # => true
|
||||
# person.errors.include?(:age) # => false
|
||||
def include?(attribute)
|
||||
(v = messages[attribute]) && v.any?
|
||||
messages[attribute].present?
|
||||
end
|
||||
# aliases include?
|
||||
alias :has_key? :include?
|
||||
|
|
Loading…
Reference in a new issue