@@ -1601,6 +1601,12 @@ def has_many(name, scope = nil, **options, &extension)
1601
1601
#
1602
1602
# Note that NestedAttributes::ClassMethods#accepts_nested_attributes_for sets
1603
1603
# <tt>:autosave</tt> to <tt>true</tt>.
1604
+ # [:touch]
1605
+ # If true, the associated object will be touched (the +updated_at+ / +updated_on+ attributes set to current time)
1606
+ # when this record is either saved or destroyed. If you specify a symbol, that attribute
1607
+ # will be updated with the current time in addition to the +updated_at+ / +updated_on+ attribute.
1608
+ # Please note that no validation will be performed when touching, and only the +after_touch+,
1609
+ # +after_commit+, and +after_rollback+ callbacks will be executed.
1604
1610
# [:inverse_of]
1605
1611
# Specifies the name of the #belongs_to association on the associated object
1606
1612
# that is the inverse of this #has_one association.
@@ -1748,11 +1754,11 @@ def has_one(name, scope = nil, **options)
1748
1754
# Note that NestedAttributes::ClassMethods#accepts_nested_attributes_for
1749
1755
# sets <tt>:autosave</tt> to <tt>true</tt>.
1750
1756
# [:touch]
1751
- # If true, the associated object will be touched (the updated_at/on attributes set to current time)
1757
+ # If true, the associated object will be touched (the + updated_at+ / +updated_on+ attributes set to current time)
1752
1758
# when this record is either saved or destroyed. If you specify a symbol, that attribute
1753
- # will be updated with the current time in addition to the updated_at/on attribute.
1754
- # Please note that with touching no validation is performed and only the +after_touch+,
1755
- # +after_commit+ and +after_rollback+ callbacks are executed.
1759
+ # will be updated with the current time in addition to the + updated_at+ / +updated_on+ attribute.
1760
+ # Please note that no validation will be performed when touching, and only the +after_touch+,
1761
+ # +after_commit+, and +after_rollback+ callbacks will be executed.
1756
1762
# [:inverse_of]
1757
1763
# Specifies the name of the #has_one or #has_many association on the associated
1758
1764
# object that is the inverse of this #belongs_to association.
0 commit comments