From 72a3dd85e415c9ec0e51d4b812b7264d4f54c75b Mon Sep 17 00:00:00 2001 From: claudiob Date: Tue, 8 Oct 2013 17:57:53 -0700 Subject: Add documentation for after_touch [ci skip] --- activerecord/lib/active_record/callbacks.rb | 5 ++++- activerecord/lib/active_record/persistence.rb | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/callbacks.rb b/activerecord/lib/active_record/callbacks.rb index e4c484d64b..128a9377c1 100644 --- a/activerecord/lib/active_record/callbacks.rb +++ b/activerecord/lib/active_record/callbacks.rb @@ -23,11 +23,14 @@ module ActiveRecord # Check out ActiveRecord::Transactions for more details about after_commit and # after_rollback. # + # Additionally, an after_touch callback is triggered whenever an + # object is touched. + # # Lastly an after_find and after_initialize callback is triggered for each object that # is found and instantiated by a finder, with after_initialize being triggered after new objects # are instantiated as well. # - # That's a total of twelve callbacks, which gives you immense power to react and prepare for each state in the + # There are nineteen callbacks in total, which give you immense power to react and prepare for each state in the # Active Record life cycle. The sequence for calling Base#save for an existing record is similar, # except that each _create callback is replaced by the corresponding _update callback. # diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb index 267aa28058..a73a140ef1 100644 --- a/activerecord/lib/active_record/persistence.rb +++ b/activerecord/lib/active_record/persistence.rb @@ -401,7 +401,8 @@ module ActiveRecord end # Saves the record with the updated_at/on attributes set to the current time. - # Please note that no validation is performed and no callbacks are executed. + # Please note that no validation is performed and only the +after_touch+ + # callback is executed. # If an attribute name is passed, that attribute is updated along with # updated_at/on attributes. # -- cgit v1.2.3