diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 4ab9565..f2e73cd 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -21,7 +21,7 @@ class UsersController < ApplicationController else @users = User.where.not(id: User.first.id) #Remove first user end - @users = @users.order("role_id desc", "confirmed desc", :name).to_a + @users = @users.order("role_id desc", "confirmed desc", :name).page(params[:page]) end def show diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index e445b8d..74d1bdd 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -4,7 +4,7 @@ <% else %>
User count: <%= @users.length %>
+User count: <%= User.count - 1 %>