From 658bddd12123355d29af06b872b5f42377d44b8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C4=B1tk=C4=B1=20Ba=C4=9Fdat?= Date: Mon, 11 Nov 2013 01:24:19 +0200 Subject: [PATCH 1/2] Replace touch method to running callbacks list `touch` method was listed in *Skipping Callbacks* list, but it triggers `after_touch` method, so I replaced it. --- guides/source/active_record_callbacks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/source/active_record_callbacks.md b/guides/source/active_record_callbacks.md index ac5e8ffc0c0e8..6294d311bc08d 100644 --- a/guides/source/active_record_callbacks.md +++ b/guides/source/active_record_callbacks.md @@ -157,6 +157,7 @@ The following methods trigger callbacks: * `save!` * `save(validate: false)` * `toggle!` +* `touch` * `update_attribute` * `update` * `update!` @@ -189,7 +190,6 @@ Just as with validations, it is also possible to skip callbacks by using the fol * `increment` * `increment_counter` * `toggle` -* `touch` * `update_column` * `update_columns` * `update_all` From 8994833861ad12c496c7f22762063d5ba2c25616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C4=B1tk=C4=B1=20Ba=C4=9Fdat?= Date: Mon, 11 Nov 2013 01:24:19 +0200 Subject: [PATCH 2/2] Replace touch method to running callbacks list `touch` method was listed in *Skipping Callbacks* list, but it triggers `after_touch` method, so I replaced it. --- guides/source/active_record_callbacks.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/guides/source/active_record_callbacks.md b/guides/source/active_record_callbacks.md index ac5e8ffc0c0e8..1dc96cf2b95dc 100644 --- a/guides/source/active_record_callbacks.md +++ b/guides/source/active_record_callbacks.md @@ -157,11 +157,14 @@ The following methods trigger callbacks: * `save!` * `save(validate: false)` * `toggle!` +* `touch` * `update_attribute` * `update` * `update!` * `valid?` +NOTE: The `touch` method triggers only `after_touch` callback. + Additionally, the `after_find` callback is triggered by the following finder methods: * `all` @@ -189,7 +192,6 @@ Just as with validations, it is also possible to skip callbacks by using the fol * `increment` * `increment_counter` * `toggle` -* `touch` * `update_column` * `update_columns` * `update_all`