mirror of
https://github.com/internetee/registry.git
synced 2025-08-11 03:59:33 +02:00
Fixed codeclimate issue
This commit is contained in:
parent
1b14a9d012
commit
6c9fb2b025
1 changed files with 0 additions and 2 deletions
|
@ -8,11 +8,9 @@ module Repp
|
||||||
desc 'Get all invoices'
|
desc 'Get all invoices'
|
||||||
def index
|
def index
|
||||||
records = current_user.registrar.invoices
|
records = current_user.registrar.invoices
|
||||||
|
|
||||||
q = records.ransack(search_params)
|
q = records.ransack(search_params)
|
||||||
q.sorts = 'created_at desc' if q.sorts.empty?
|
q.sorts = 'created_at desc' if q.sorts.empty?
|
||||||
invoices = q.result(distinct: true)
|
invoices = q.result(distinct: true)
|
||||||
|
|
||||||
limited_invoices = invoices.limit(limit).offset(offset)
|
limited_invoices = invoices.limit(limit).offset(offset)
|
||||||
.includes(:items, :account_activity, :buyer)
|
.includes(:items, :account_activity, :buyer)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue