提交 5eaf39b1 编写于 作者: J Julian Nadeau 提交者: Rafael Mendonça França

Add note about human_attribute_name symbol/string

This was always the intended API as per discussion in https://github.com/rails/rails/issues/36916, however versions before Rails 6 always passed a symbol. This means that some apps relied on symbols to be passed, this change is intended to note the change in behaviour so that apps can respond in kind.
上级 e3b2a573
......@@ -89,6 +89,16 @@
## Rails 6.0.0.beta1 (January 18, 2019) ##
* Internal calls to `human_attribute_name` on an `Active Model` now pass attributes as strings instead of symbols
in some cases.
This is in line with examples in Rails docs and puts the code in line with the intention -
the potential use of strings or symbols.
It is recommended to cast the attribute input to your desired type as if you you are overriding that methid.
*Martin Larochelle*
* Add `ActiveModel::Errors#of_kind?`.
*bogdanvlviv*, *Rafael Mendonça França*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册