From 7455e81b316b3db2601268a567ebd206911e2c18 Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Sat, 22 Nov 2014 01:41:59 +0530 Subject: [PATCH] sort screened IPs by match_count --- app/controllers/admin/screened_ip_addresses_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/screened_ip_addresses_controller.rb b/app/controllers/admin/screened_ip_addresses_controller.rb index 00b5acb27..efd9e9ce9 100644 --- a/app/controllers/admin/screened_ip_addresses_controller.rb +++ b/app/controllers/admin/screened_ip_addresses_controller.rb @@ -3,7 +3,7 @@ class Admin::ScreenedIpAddressesController < Admin::AdminController before_filter :fetch_screened_ip_address, only: [:update, :destroy] def index - screened_ip_addresses = ScreenedIpAddress.limit(200).order('id desc').to_a + screened_ip_addresses = ScreenedIpAddress.limit(200).order('match_count desc').to_a render_serialized(screened_ip_addresses, ScreenedIpAddressSerializer) end