mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Reference updated errors attribute names method in deprecation warning
This commit is contained in:
parent
d796193e2d
commit
096f2d1f83
1 changed files with 1 additions and 1 deletions
|
@ -271,7 +271,7 @@ module ActiveModel
|
|||
# person.errors.messages # => {:name=>["cannot be nil", "must be specified"]}
|
||||
# person.errors.keys # => [:name]
|
||||
def keys
|
||||
deprecation_removal_warning(:keys, "errors.map { |error| error.attribute }")
|
||||
deprecation_removal_warning(:keys, "errors.attribute_names")
|
||||
keys = @errors.map(&:attribute)
|
||||
keys.uniq!
|
||||
keys.freeze
|
||||
|
|
Loading…
Reference in a new issue