From 2f343aeebae596ef594876b191e4a45ae17825b0 Mon Sep 17 00:00:00 2001 From: Adrian Short Date: Wed, 10 Oct 2018 22:12:59 +0100 Subject: [PATCH] Make applications and decisions pages longer; sort authority apps most recent first [skip ci] --- lib/site.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/site.rb b/lib/site.rb index 2b032aa..4310d97 100644 --- a/lib/site.rb +++ b/lib/site.rb @@ -15,11 +15,11 @@ class Site Petrify.csv(path, 'inlink-summary', summary) # New applications page - apps = ScraperWiki.select("* from `applications` order by date_received desc limit 30") + apps = ScraperWiki.select("* from `applications` order by date_received desc limit 60") Petrify.page('new-applications', 'new-applications', { apps: apps }) # Latest decisions page - apps = ScraperWiki.select("* from `applications` order by date_decision desc limit 30") + apps = ScraperWiki.select("* from `applications` order by date_decision desc limit 60") path = 'decisions' Petrify.page(path, 'decisions', { apps: apps }) Petrify.csv(path, 'inlink-decisions', apps) @@ -54,7 +54,7 @@ class Site group by status, decision, appeal_status, appeal_decision ", auth['authority_name']) - apps = ScraperWiki.select("* from applications where authority_name = ? order by date_received", auth['authority_name']) + apps = ScraperWiki.select("* from applications where authority_name = ? order by date_received desc", auth['authority_name']) path = ['authorities', slug(auth['authority_name'])] Petrify.page(path, 'authority', { apps: apps, auth: auth, summary: summary })