fixed admin pagination

This commit is contained in:
dinsmol 2021-07-29 15:26:44 +03:00
parent f81c06673c
commit 11029e83ce
25 changed files with 126 additions and 15 deletions

View file

@ -29,6 +29,8 @@ module Admin
@q.sorts = ['zone_id asc', 'duration asc', 'operation_category asc',
'valid_from desc', 'valid_to asc'] if @q.sorts.empty?
@prices = @q.result.page(params[:page])
@count = @q.result.count
@prices = @q.result.page(params[:page]).per(params[:results_per_page])
end
def new