[openstreetmap/openstreetmap-website] Limit the number of users counted for users#index (PR #5181)
Tom Hughes
notifications at github.com
Wed Sep 11 17:30:19 UTC 2024
@tomhughes commented on this pull request.
> @@ -38,7 +38,9 @@ def index
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 = "500+" if @users_count > 500
Thanks - I've fixed that now.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5181#discussion_r1755214559
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5181/review/2298077273 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240911/85c78531/attachment.htm>
More information about the rails-dev
mailing list