提交 0cb67a63 编写于 作者: S Santiago Bartesaghi

Documentation: Add touch_all to callbacks and validations guides [ci skip]

上级 596d4dbb
......@@ -508,8 +508,8 @@ def update_counters(counters)
update_all updates
end
# Touches all records in the current relation without instantiating records first with the +updated_at+/+updated_on+ attributes
# set to the current time or the time specified.
# Touches all records in the current relation, setting the +updated_at+/+updated_on+ attributes to the current time or the time specified.
# It does not instantiate the involved models, and it does not trigger Active Record callbacks or validations.
# This method can be passed attribute names and an optional time argument.
# If attribute names are passed, they are updated along with +updated_at+/+updated_on+ attributes.
# If no time argument is passed, the current time is used as default.
......
......@@ -247,6 +247,7 @@ Just as with validations, it is also possible to skip callbacks by using the fol
* `delete_all`
* `increment!`
* `increment_counter`
* `touch_all`
* `update_column`
* `update_columns`
* `update_all`
......
......@@ -135,6 +135,7 @@ database regardless of its validity. They should be used with caution.
* `increment_counter`
* `toggle!`
* `touch`
* `touch_all`
* `update_all`
* `update_attribute`
* `update_column`
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册