aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/compliance_checks_controller.rb2
-rw-r--r--app/controllers/exports_controller.rb2
-rw-r--r--app/controllers/imports_controller.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/compliance_checks_controller.rb b/app/controllers/compliance_checks_controller.rb
index 9b29692c2..39ae397e6 100644
--- a/app/controllers/compliance_checks_controller.rb
+++ b/app/controllers/compliance_checks_controller.rb
@@ -76,7 +76,7 @@ class ComplianceChecksController < ChouetteController
end
def collection
- @compliance_checks ||= compliance_check_service.all.paginate(:page => params[:page])
+ @compliance_checks ||= compliance_check_service.all.sort_by{ |compliance_check| compliance_check.created_at }.reverse.paginate(:page => params[:page])
end
end
diff --git a/app/controllers/exports_controller.rb b/app/controllers/exports_controller.rb
index 80c70902e..d6e9cdf42 100644
--- a/app/controllers/exports_controller.rb
+++ b/app/controllers/exports_controller.rb
@@ -67,6 +67,6 @@ class ExportsController < ChouetteController
end
def collection
- @exports ||= export_service.all.paginate(:page => params[:page])
+ @exports ||= export_service.all.sort_by{ |export| export.created_at }.reverse.paginate(:page => params[:page])
end
end
diff --git a/app/controllers/imports_controller.rb b/app/controllers/imports_controller.rb
index 2d4782d50..b3c04d51b 100644
--- a/app/controllers/imports_controller.rb
+++ b/app/controllers/imports_controller.rb
@@ -97,7 +97,7 @@ class ImportsController < ChouetteController
end
def collection
- @imports ||= import_service.all.paginate(:page => params[:page])
+ @imports ||= import_service.all.sort_by{ |import| import.created_at }.reverse.paginate(:page => params[:page])
end
end