提交 85a40f6f 编写于 作者: B Bruno Michel

:touch => :symbol also updates the updated_at attribute

上级 bb1af052
...@@ -1379,7 +1379,7 @@ def has_one(name, options = {}) ...@@ -1379,7 +1379,7 @@ def has_one(name, options = {})
# [:touch] # [:touch]
# If true, the associated object will be touched (the updated_at/on attributes set to now) # If true, the associated object will be touched (the updated_at/on attributes set to now)
# when this record is either saved or destroyed. If you specify a symbol, that attribute # when this record is either saved or destroyed. If you specify a symbol, that attribute
# will be updated with the current time instead of the updated_at/on attribute. # will be updated with the current time in addition to the updated_at/on attribute.
# [:inverse_of] # [:inverse_of]
# Specifies the name of the <tt>has_one</tt> or <tt>has_many</tt> association on the associated # Specifies the name of the <tt>has_one</tt> or <tt>has_many</tt> association on the associated
# object that is the inverse of this <tt>belongs_to</tt> association. Does not work in # object that is the inverse of this <tt>belongs_to</tt> association. Does not work in
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册