From 6c9fb2b025d5d376dc3f2498bff36c545ec1ff28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergei=20Ts=C3=B5ganov?= Date: Tue, 14 Jun 2022 11:33:59 +0300 Subject: [PATCH] Fixed codeclimate issue --- app/controllers/repp/v1/invoices_controller.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/controllers/repp/v1/invoices_controller.rb b/app/controllers/repp/v1/invoices_controller.rb index 32ea74bc2..8add1920b 100644 --- a/app/controllers/repp/v1/invoices_controller.rb +++ b/app/controllers/repp/v1/invoices_controller.rb @@ -8,11 +8,9 @@ module Repp desc 'Get all invoices' def index records = current_user.registrar.invoices - q = records.ransack(search_params) q.sorts = 'created_at desc' if q.sorts.empty? invoices = q.result(distinct: true) - limited_invoices = invoices.limit(limit).offset(offset) .includes(:items, :account_activity, :buyer)