diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-12-29 20:40:56 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-12-29 20:40:56 -0300 |
commit | 298ec6de55e3adb7d012ba6a9db8b4dd5fd95779 (patch) | |
tree | 0edbbb81ad06d5140eb813fbc305f4edcadb9766 | |
parent | bf70dea0d6aa4924fe9a4a0bb9dd0eea3a57e9ec (diff) | |
parent | 5e84a24fcd4f9fc365f15adb230069d4beefb7d7 (diff) | |
download | rails-298ec6de55e3adb7d012ba6a9db8b4dd5fd95779.tar.gz rails-298ec6de55e3adb7d012ba6a9db8b4dd5fd95779.tar.bz2 rails-298ec6de55e3adb7d012ba6a9db8b4dd5fd95779.zip |
Merge pull request #18249 from claudiob/add-doc-for-save-with-touch
Add doc for `:touch` option of AR::Base#save
-rw-r--r-- | activerecord/lib/active_record/persistence.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb index ded190c111..f53c5f17ef 100644 --- a/activerecord/lib/active_record/persistence.rb +++ b/activerecord/lib/active_record/persistence.rb @@ -109,6 +109,10 @@ module ActiveRecord # validate: false, validations are bypassed altogether. See # 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 # <tt>before_*</tt> callbacks return +false+ the action is cancelled and # +save+ returns +false+. See ActiveRecord::Callbacks for further @@ -131,6 +135,10 @@ module ActiveRecord # ActiveRecord::RecordInvalid gets raised. See 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 <tt>save!</tt>. If any of # the <tt>before_*</tt> callbacks return +false+ the action is cancelled # and <tt>save!</tt> raises ActiveRecord::RecordNotSaved. See |