Skip to content

Commit

Permalink
add 4th paginate option to display all users
Browse files Browse the repository at this point in the history
  • Loading branch information
kevindai2002 committed Oct 27, 2024
1 parent d0e73f1 commit ed0c4d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def role

# For filtering the users list with proper search and pagination.
def paginate_list
paginate_options = { '1' => 25, '2' => 50, '3' => 100 }
paginate_options = { '1' => 25, '2' => 50, '3' => 100, '4' => User.count}

# If the above hash does not have a value for the key,
# it means that we need to show all the users on the page
Expand All @@ -259,7 +259,7 @@ def paginate_list

# The type of condition for the search depends on what the user has selected from the search_by dropdown
@search_by = params[:search_by]
@per_page = 3
@per_page = 4
# search for corresponding users
# users = User.search_users(role, user_id, letter, @search_by)

Expand Down

0 comments on commit ed0c4d7

Please sign in to comment.