replaced deprecated method (search)

This commit is contained in:
dinsmol 2021-09-06 21:32:56 +03:00
parent e5e56b9de7
commit f9f74fa3e3
20 changed files with 26 additions and 26 deletions

View file

@ -4,7 +4,7 @@ module Admin
before_action :set_user, only: [:show, :edit, :update, :destroy]
def index
@q = AdminUser.search(params[:q])
@q = AdminUser.ransack(params[:q])
@admin_users = @q.result.page(params[:page]).order(:username)
@count = @q.result.count
@admin_users = @admin_users.per(params[:results_per_page]) if paginate?