From dfe9ab2c69403988bc77c669ab1c4a4a85317459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sat, 26 Oct 2019 00:16:59 +0200 Subject: [PATCH] Apply Style/ClassCheck rubocop rule We were already using `is_a?` almost everywhere. --- .rubocop.yml | 3 +++ app/controllers/admin/budget_investments_controller.rb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index 8b87da99b..a5575bf5e 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -373,6 +373,9 @@ Style/AndOr: Style/BlockDelimiters: Enabled: true +Style/ClassCheck: + Enabled: true + Style/Not: Enabled: true diff --git a/app/controllers/admin/budget_investments_controller.rb b/app/controllers/admin/budget_investments_controller.rb index c532ef320..aab41bbcf 100644 --- a/app/controllers/admin/budget_investments_controller.rb +++ b/app/controllers/admin/budget_investments_controller.rb @@ -84,7 +84,7 @@ class Admin::BudgetInvestmentsController < Admin::BaseController def load_investments @investments = Budget::Investment.scoped_filter(params, @current_filter).order_filter(params) - @investments = Kaminari.paginate_array(@investments) if @investments.kind_of?(Array) + @investments = Kaminari.paginate_array(@investments) if @investments.is_a?(Array) @investments = @investments.page(params[:page]) unless request.format.csv? end