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

@ -11,6 +11,8 @@ module Admin
@repp_logs = @repp_logs.where("extract(epoch from created_at) >= extract(epoch from ?::timestamp)", Time.parse(params[:q][:created_at_gteq])) if params[:q][:created_at_gteq].present?
@repp_logs = @repp_logs.where("extract(epoch from created_at) <= extract(epoch from ?::timestamp)", Time.parse(params[:q][:created_at_lteq])) if params[:q][:created_at_lteq].present?
@repp_logs = @repp_logs.page(params[:page])
@count = @q.result.count
@repp_logs = @repp_logs.per(params[:results_per_page]) if params[:results_per_page].to_i.positive?
end
def show