From 8e1132220e99768d4713afe6428282c98ddaf2c6 Mon Sep 17 00:00:00 2001 From: Matthew Landauer Date: Mon, 6 Nov 2023 04:45:29 +0000 Subject: [PATCH] Make title work when looking at applications for a particular authority --- app/controllers/applications_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/applications_controller.rb b/app/controllers/applications_controller.rb index 3d68e14b0..516a712d1 100644 --- a/app/controllers/applications_controller.rb +++ b/app/controllers/applications_controller.rb @@ -11,7 +11,7 @@ def index authority_id = T.cast(params[:authority_id], T.nilable(String)) description = if show_tailwind_theme? - +"Most recent applications across Australia" + +"Most recent applications" else +"Recent applications within the last #{Application.nearby_and_recent_max_age_months} months" end @@ -21,6 +21,7 @@ def index description << " from #{authority.full_name_and_state}" apps = authority.applications else + description << " across Australia" if show_tailwind_theme? apps = Application end apps = apps.order("first_date_scraped DESC").where("first_date_scraped > ?", Application.nearby_and_recent_max_age_months.months.ago)