]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/users/lists_controller.rb
Allow searching users by IP subnet
[rails.git] / 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