From 799692564480d3a7f88d30ec31ed02f379bda48b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Tue, 18 Jul 2023 14:17:36 +0200 Subject: [PATCH] Allow current way to write respond_to blocks Not sure exactly since when, but we've started to get rubocop failures when using the pattern: respond_to do |format| format.js end We've been using this pattern for ages, so maybe a recent version of Rubocop introduced a change that made it report it. In any case, this is easier to read than respond_to(&:js), so we're allowing it. --- .rubocop.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.rubocop.yml b/.rubocop.yml index ed46718de..8bd439eae 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -594,6 +594,8 @@ Style/StringLiteralsInInterpolation: Style/SymbolProc: Enabled: true + AllowedMethods: + - respond_to Style/TrailingCommaInArrayLiteral: Enabled: true