-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clarify dangers of Rails/LexicallyScopedActionFilter
This cop encourages users to define action methods in the same class as any before_, after_ or around_actions that refer to the action. However, the examples given don't account for the fact that behaviour might be defined in the superclass. Indeed, this sort of decoration is one of the main use cases for action decorators. If this is the case, then the empty action definitions shown in the docs will override the desired behaviour, and lead users to introduce bugs. This change emphasises this in the docs, and gives an example to encourage users to think about the inheritance chain.
- Loading branch information
1 parent
aefacd5
commit 1f5e9fb
Showing
2 changed files
with
60 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters