From 733ada2f6aa2b119371ea5be2e563ad9569bcfbd Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Tue, 30 Dec 2014 20:47:29 +0800 Subject: [PATCH] sort fix for ajax --- app/controllers/admin/registered_sites_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/registered_sites_controller.rb b/app/controllers/admin/registered_sites_controller.rb index c8adb28..dd90b4f 100644 --- a/app/controllers/admin/registered_sites_controller.rb +++ b/app/controllers/admin/registered_sites_controller.rb @@ -44,7 +44,7 @@ class Admin::RegisteredSitesController < OrbitAdminController site.save end @table_fields = table_fields - @registeredsites = RegisteredSite.all.page(params[:page]).per(10) + @registeredsites = RegisteredSite.all.desc(:created_at).page(params[:page]).per(10) # render :partial => "index" end