Apply Style/ClassCheck rubocop rule

We were already using `is_a?` almost everywhere.
This commit is contained in:
Javi Martín
2019-10-26 00:16:59 +02:00
parent a5def0cdb5
commit dfe9ab2c69
2 changed files with 4 additions and 1 deletions

View File

@@ -373,6 +373,9 @@ Style/AndOr:
Style/BlockDelimiters:
Enabled: true
Style/ClassCheck:
Enabled: true
Style/Not:
Enabled: true

View File

@@ -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