From: Anton Khorev Date: Thu, 12 Sep 2024 06:18:49 +0000 (+0300) Subject: Merge branch 'pull/5181' X-Git-Tag: live~690 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/36d72d289a07c205ec2bcee6090c41bae9742a66?hp=17bea98e199f204b22847356fc64beaa81a9373a Merge branch 'pull/5181' --- diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 4ebeb1ec3..bc1baf8a5 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -38,7 +38,9 @@ class UsersController < ApplicationController users = users.where(:status => @params[:status]) if @params[:status] users = users.where(:creation_ip => @params[:ip]) if @params[:ip] - @users_count = users.count + @users_count = users.limit(501).count + @users_count = I18n.t("count.at_least_pattern", :count => 500) if @users_count > 500 + @users, @newer_users_id, @older_users_id = get_page_items(users, :limit => 50) render :partial => "page" if turbo_frame_request_id == "pagination"