提交 1a6d7622 编写于 作者: N Neeraj Singh

expanding on the will_change! method in documentation

上级 627d870c
......@@ -83,7 +83,10 @@ module ActiveModel
# person.name_changed? # => false
# person.name # => 'Bill'
#
# Before modifying an attribute in-place:
# If an attribute is modified in-place then make use of <tt>[attribute_name]_will_change!</tt>
# to mark that the attribute is changing. Otherwise ActiveModel can't track changes to
# in-place attributes.
#
# person.name_will_change!
# person.name << 'y'
# person.name_change # => ['Bill', 'Billy']
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册