Intalled pagy and applyed to admin/users index

This commit is contained in:
2024-09-16 18:16:42 +02:00
parent 11d944b64c
commit e6cbeb9596
10 changed files with 283 additions and 27 deletions

View File

@@ -4,6 +4,7 @@ class Admin::UsersController < ApplicationController
def index
@users = User.all.order(:lastname, :firstname)
@pagy, @records = pagy(@users, limit: 20)
end
def edit

View File

@@ -1,4 +1,6 @@
class ApplicationController < ActionController::Base
include Pagy::Backend
before_action :set_current_request_details
before_action :authenticate_user!