Skip to content

Commit

Permalink
Merge pull request #12473 from claudiob/document-after-touch
Browse files Browse the repository at this point in the history
Add documentation for after_touch [ci skip]
  • Loading branch information
senny committed Oct 9, 2013
1 parent 9f5ec21 commit 582a90c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion activerecord/lib/active_record/callbacks.rb
Expand Up @@ -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.
#
Expand Down
3 changes: 2 additions & 1 deletion activerecord/lib/active_record/persistence.rb
Expand Up @@ -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.
#
Expand Down

0 comments on commit 582a90c

Please sign in to comment.