]> git.openstreetmap.org Git - rails.git/commitdiff
Allow searching users by IP subnet
authorTom Hughes <tom@compton.nu>
Sat, 15 Feb 2025 14:36:02 +0000 (14:36 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 15 Feb 2025 14:37:50 +0000 (14:37 +0000)
app/controllers/users/lists_controller.rb

index d0bb648889c21325d1cf645952d00ac00a9cb84b..a2f35e9b213a8f5ea91a4a8ecbbe76ca1e889c97 100644 (file)
@@ -17,7 +17,7 @@ module Users
 
       users = User.all
       users = users.where(:status => @params[:status]) if @params[:status].present?
-      users = users.where(:creation_address => @params[:ip]) if @params[:ip].present?
+      users = users.where("creation_address <<= ?", @params[:ip]) if @params[:ip].present?
 
       @users_count = users.limit(501).count
       @users_count = I18n.t("count.at_least_pattern", :count => 500) if @users_count > 500