diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-10-09 02:09:52 -0700 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-10-09 02:09:52 -0700 |
commit | 09b3b76f77aa6c033566eb4abd011b41604aeacc (patch) | |
tree | 748c589ce0447d6b0bf9c2be9b384bdbea1641ce /activerecord/lib/active_record | |
parent | 941516dabcc5fd02eb736f457197bd115c85f2fb (diff) | |
parent | 72a3dd85e415c9ec0e51d4b812b7264d4f54c75b (diff) | |
download | rails-09b3b76f77aa6c033566eb4abd011b41604aeacc.tar.gz rails-09b3b76f77aa6c033566eb4abd011b41604aeacc.tar.bz2 rails-09b3b76f77aa6c033566eb4abd011b41604aeacc.zip |
Merge pull request #12473 from claudiob/document-after-touch
Add documentation for after_touch [ci skip]
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/callbacks.rb | 5 | ||||
-rw-r--r-- | activerecord/lib/active_record/persistence.rb | 3 |
2 files changed, 6 insertions, 2 deletions
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 <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. # 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. # |