提交 e4701e61 编写于 作者: B Benjamin Quorning

[] and read_attribute are not aliases [ci skip]

The `#[]` method *used to be* an alias of `#read_attribute`, but since Rails 4
(10f6f90d), it will raise an exception for
missing attributes. Saying that it is an alias is confusing.
上级 661ed303
......@@ -334,8 +334,6 @@ def attribute_present?(attribute)
#
# Note: +:id+ is always present.
#
# Alias for the #read_attribute method.
#
# class Person < ActiveRecord::Base
# belongs_to :organization
# end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册