mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 13:15:40 +02:00
codeclimate fixes
This commit is contained in:
parent
0c2dc9f957
commit
ec1a48743c
11 changed files with 14 additions and 17 deletions
|
@ -5,7 +5,7 @@ module Admin
|
|||
def index
|
||||
@q = ApiUser.includes(:registrar).search(params[:q])
|
||||
@api_users = @q.result.page(params[:page])
|
||||
api_users_paginate if params[:results_per_page].to_i.positive?
|
||||
@api_users = @api_users.per(params[:results_per_page]) if paginate?
|
||||
end
|
||||
|
||||
def new
|
||||
|
@ -57,9 +57,5 @@ module Admin
|
|||
def registrar
|
||||
Registrar.find(params[:registrar_id])
|
||||
end
|
||||
|
||||
def api_users_paginate
|
||||
@api_users = @api_users.per(params[:results_per_page])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue