rails_best_practices icon indicating copy to clipboard operation
rails_best_practices copied to clipboard

Controller methods used in around_actions shouldn't be considered unused

Open trliner opened this issue 10 years ago • 1 comments

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.

trliner avatar Jan 21 '15 22:01 trliner

+1

jcarlos avatar Jan 29 '16 06:01 jcarlos