rails_best_practices
rails_best_practices copied to clipboard
Controller methods used in around_actions shouldn't be considered unused
The gem currently considers methods used in an around_filter
to be used but methods used in an around_action
to be unused. Since Rails is now discouraging the use of the *_filter
family of methods (see Rails 4.2 release notes), the gem should consider around_action
methods to be used as well.
It seems the easiest fix for this would be to change this line from when "around_filter"
to when "around_filter", "around_action"
. Should it be added to the list of nodes to skip for start_command
callbacks also?
I can make the code changes (and add tests) if that seems like a reasonable solution.
+1