mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add doc for :touch
option of AR::Base#save
ActiveRecord::Base `save` and `save!` take an option boolean `:touch` parameter since #18225 (stems from #18202). This commit document that parameter. [ci skip]
This commit is contained in:
parent
8beb781d0e
commit
5e84a24fcd
1 changed files with 8 additions and 0 deletions
|
@ -109,6 +109,10 @@ module ActiveRecord
|
||||||
# validate: false, validations are bypassed altogether. See
|
# validate: false, validations are bypassed altogether. See
|
||||||
# ActiveRecord::Validations for more information.
|
# ActiveRecord::Validations for more information.
|
||||||
#
|
#
|
||||||
|
# By default, #save also sets the +updated_at+/+updated_on+ attributes to
|
||||||
|
# the current time. However, if you supply <tt>touch: false</tt>, these
|
||||||
|
# timestamps will not be updated.
|
||||||
|
#
|
||||||
# There's a series of callbacks associated with +save+. If any of the
|
# There's a series of callbacks associated with +save+. If any of the
|
||||||
# <tt>before_*</tt> callbacks return +false+ the action is cancelled and
|
# <tt>before_*</tt> callbacks return +false+ the action is cancelled and
|
||||||
# +save+ returns +false+. See ActiveRecord::Callbacks for further
|
# +save+ returns +false+. See ActiveRecord::Callbacks for further
|
||||||
|
@ -131,6 +135,10 @@ module ActiveRecord
|
||||||
# ActiveRecord::RecordInvalid gets raised. See ActiveRecord::Validations
|
# ActiveRecord::RecordInvalid gets raised. See ActiveRecord::Validations
|
||||||
# for more information.
|
# for more information.
|
||||||
#
|
#
|
||||||
|
# By default, #save! also sets the +updated_at+/+updated_on+ attributes to
|
||||||
|
# the current time. However, if you supply <tt>touch: false</tt>, these
|
||||||
|
# timestamps will not be updated.
|
||||||
|
#
|
||||||
# There's a series of callbacks associated with <tt>save!</tt>. If any of
|
# There's a series of callbacks associated with <tt>save!</tt>. If any of
|
||||||
# the <tt>before_*</tt> callbacks return +false+ the action is cancelled
|
# the <tt>before_*</tt> callbacks return +false+ the action is cancelled
|
||||||
# and <tt>save!</tt> raises ActiveRecord::RecordNotSaved. See
|
# and <tt>save!</tt> raises ActiveRecord::RecordNotSaved. See
|
||||||
|
|
Loading…
Reference in a new issue