提交 19ec6233 编写于 作者: A Adam Hess

Update the Active Model deprecation warning

This message more clearly communicates how to access the attribute and message keys that you would expect to get when using the previous API.

before you might iterate over errors like,

errors.each do |attribute, message|
  # My error code here
end

This message helps the user find the methods on error that match the previous API.
上级 855c9897
......@@ -230,7 +230,8 @@ def each(&block)
parameter like this:
person.errors.each do |error|
error.full_message
attribute = error.attribute
message = error.message
end
You are passing a block expecting two parameters,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册