From: Andy Allan Date: Wed, 20 Mar 2019 14:07:33 +0000 (+0100) Subject: Use a lambda in order to pass parameters in before_actions X-Git-Tag: live~3732^2~2 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/dad36f2fca68142c53875cdacc55192d1561effd?hp=dad36f2fca68142c53875cdacc55192d1561effd Use a lambda in order to pass parameters in before_actions This avoid calling methods on a new instance of the controller, and therefore allows these methods to be marked as private. As a bonus, rubocop can now parse them and warn when they refer to actions that don't exist in the controller. ---