aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/action_controller_overview.md
diff options
context:
space:
mode:
authordixpac <dino.onex@gmail.com>2017-05-13 13:56:37 +0200
committerdixpac <dino.onex@gmail.com>2017-05-21 18:45:59 +0200
commit4f3955657736796664aa8d6f6d149ef9b213b058 (patch)
treed9122eff4d99a7e3e3f40a374bb19402da2ca578 /guides/source/action_controller_overview.md
parent23aa0a2bb551717f153ac75f24c017c43ab853f2 (diff)
downloadrails-4f3955657736796664aa8d6f6d149ef9b213b058.tar.gz
rails-4f3955657736796664aa8d6f6d149ef9b213b058.tar.bz2
rails-4f3955657736796664aa8d6f6d149ef9b213b058.zip
Improving docs for callbacks execution order [ci skip]
When define callbacks latest definition on the same callback/method overwrites previous ones.
Diffstat (limited to 'guides/source/action_controller_overview.md')
-rw-r--r--guides/source/action_controller_overview.md3
1 files changed, 3 insertions, 0 deletions
diff --git a/guides/source/action_controller_overview.md b/guides/source/action_controller_overview.md
index 5d987264f5..22537f960c 100644
--- a/guides/source/action_controller_overview.md
+++ b/guides/source/action_controller_overview.md
@@ -715,6 +715,9 @@ end
Now, the `LoginsController`'s `new` and `create` actions will work as before without requiring the user to be logged in. The `:only` option is used to skip this filter only for these actions, and there is also an `:except` option which works the other way. These options can be used when adding filters too, so you can add a filter which only runs for selected actions in the first place.
+NOTE: Calling the same filter multiple times with different options will not work,
+since the last filter definition will overwrite the previous ones.
+
### After Filters and Around Filters
In addition to "before" filters, you can also run filters after an action has been executed, or both before and after.