未验证 提交 b69ac962 编写于 作者: R Rafael França 提交者: GitHub

Merge pull request #39016 from HParker/reference-easier-error-attribute-method

Reference updated errors attribute names method in deprecation warning
......@@ -271,7 +271,7 @@ def values
# 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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册