From 11f1a4f6d0a712a02a2cabfcac1cafe2db571be0 Mon Sep 17 00:00:00 2001 From: Adrian Short Date: Fri, 7 May 2010 14:17:45 +0100 Subject: [PATCH] Added ward list to home page --- app.rb | 2 ++ views/home.haml | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app.rb b/app.rb index 2cda70d..d9bd293 100644 --- a/app.rb +++ b/app.rb @@ -23,6 +23,8 @@ get '/' do redirect "/wards/#{@ward.slug}/postcode/#{@postcode}" end + @wards = Ward.all + haml :home end diff --git a/views/home.haml b/views/home.haml index 0921f22..6bc70a8 100644 --- a/views/home.haml +++ b/views/home.haml @@ -10,9 +10,14 @@ %h2 Sutton Council Election Results - %p - Votes for the Sutton Council election will be counted during the day on Friday 7 May. Results will appear here as soon as they are available. - + %p Results for Worcester Park Ward are still awaited. + + - for ward in @wards + - if ward.id != 18 + %p + %a{ :href=> "/results/sutton-council/2010-05-06/#{ward.slug}" } + = ward.name + Ward -# %h1 Vote for your MP and