Permalink
Browse files

Merge pull request #12473 from claudiob/document-after-touch

Add documentation for after_touch [ci skip]
  • Loading branch information...
1 parent 9f5ec21 commit 582a90c09386839d7374fa1933ca4d805e1140a1 @senny senny committed Oct 9, 2013
Showing with 6 additions and 2 deletions.
  1. +4 −1 activerecord/lib/active_record/callbacks.rb
  2. +2 −1 activerecord/lib/active_record/persistence.rb
@@ -23,11 +23,14 @@ module ActiveRecord
# Check out <tt>ActiveRecord::Transactions</tt> for more details about <tt>after_commit</tt> and
# <tt>after_rollback</tt>.
#
+ # Additionally, an <tt>after_touch</tt> callback is triggered whenever an
+ # object is touched.
+ #
# Lastly an <tt>after_find</tt> and <tt>after_initialize</tt> callback is triggered for each object that
# is found and instantiated by a finder, with <tt>after_initialize</tt> 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 <tt>Base#save</tt> for an existing record is similar,
# except that each <tt>_create</tt> callback is replaced by the corresponding <tt>_update</tt> callback.
#
@@ -400,7 +400,8 @@ def reload(options = nil)
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.
#

0 comments on commit 582a90c

Please sign in to comment.