1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Active Model: Messages for strict validation always convert attributes to human readable form [ci skip]

This commit is contained in:
Prathamesh Sonpatki 2016-05-01 13:41:57 -05:00
parent 7b37e3edaf
commit 707b5c00ab
No known key found for this signature in database
GPG key ID: 8B90F6B89E2BCB71

View file

@ -310,9 +310,9 @@ module ActiveModel
# <tt>:strict</tt> option can also be set to any other exception.
#
# person.errors.add(:name, :invalid, strict: true)
# # => ActiveModel::StrictValidationFailed: name is invalid
# # => ActiveModel::StrictValidationFailed: Name is invalid
# person.errors.add(:name, :invalid, strict: NameIsInvalid)
# # => NameIsInvalid: name is invalid
# # => NameIsInvalid: Name is invalid
#
# person.errors.messages # => {}
#